Age | Commit message (Collapse) | Author |
|
starts with an octal digit. From Andreas Gruenbacher.
|
|
|
|
|
|
xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
(MODE_DONE): New constant.
(struct mode_change): Remove 'next' member.
(make_node_op_equals): New function; like the old one of the
same name, except it allocates an array.
(mode_compile, mode_create_from_ref): Use it.
(mode_compile): Allocate result as an array, not a linked list.
Parse octal string ourself, so that we catch mistakes like "+0".
(mode_adjust): Arg is an array, not a linked list.
|
|
(S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
(S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
(S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
Remove. This is now stat-macros.h's job.
(talloc): Remove. All callers replaced by xalloc, so that
our invokers don't have to worry about reporting memory failures.
(make_node_op_equals): Remove.
(MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
New constants.
(struct mode_change): Moved here from modechange.h.
(mode_append_entry): Remove.
(mode_compile): Remove MASKED_OPS arg, since it encouraged
apps to have incorrect behavior. Use simpler algorithm for head
and tail. Don't futz with umask; that's now the job of mode_adjust.
Detect more invalid usages rather than having somewhat-random behavior.
Don't insert an "a=" action, as that leads to incorrect behavior.
(mode_compile, mode_create_from_ref): Return NULL on error instead
of an enum, since now there's only one way to have an error. All
callers changed.
(mode_adjust): Accept new arg UMASK_VALUE, and interpret it
at the correct time. Simplify calculation of "+u" and its ilk.
Don't mishandle "+X".
(mode_free): Remove "register" and localize decls.
|
|
points to the start of a string, as the C Standard says the
resulting behavior is undefined.
|
|
|
|
(mode_compile): Use bool when appropriate.
|
|
(malloc): Remove decl.
|
|
(NULL): Don't define, since <stddef.h> does that.
|
|
`signed and unsigned type in conditional expression'.
|
|
that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
rather than group writable. Patch by Juan F. Codagnone.
|
|
|
|
traditional octal encoding. E.g. "chmod 1 FOO" should set
the other-execute bit of FOO even if S_IXOTH != 1.
(SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
WOTH, XOTH, ALLM): New macros.
(S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
Use them.
(S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
(S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
(mode_compile):
No need to use uintmax_t; unsigned long is long enough.
Don't bother to get suffix since we don't use it.
|
|
changed this year other than in the copyright notice.
|
|
long, to parse numeric modes. Check for any unknown bits, not
just unknown bits left of the leftmost known bit.
|
|
Use proper mode_t types and macros.
Don't assume the traditional Unix values for mode bits.
modechange.h now includes sys/types.h.
Include xstrtol.h.
(isodigit, oatoi): Remove.
(S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP,
S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXU, S_IRWXG,
S_IRWXO): Define if not defined.
(CHMOD_MODE_BITS): New macro.
(mode_compile): Convert from octal with xstrtoul, not our own routine.
|
|
(mode_append_entry): Likewise.
(mode_compile): When none of [ugoa] is specified in an `=OP' change
mode request, insert a `=0' entry into the linked list so that all
bits are cleared first. Use the new functions.
|
|
everything starting with the head, not the tail.
|
|
|
|
|
|
|
|
|
|
Don't use MODE_X_IF_ANY_X.
|
|
|
|
|
|
|
|
|
|
Remove register attribute.
(mode_adjust): Likewise for CHANGES.
|
|
|
|
|
|
|
|
|