Mercurial > hg > octave-lojdl > gnulib-hg
changeset 3637:a8a3aa331a69
(mode_adjust): Fix error introduced on 1999-04-26
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.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 19 Nov 2001 13:32:23 +0000 |
parents | 682016ff45ec |
children | 973938552a8b |
files | lib/modechange.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/modechange.c +++ b/lib/modechange.c @@ -413,18 +413,18 @@ if (changes->value & S_IRWXU) /* Copy `u' permissions onto `g' and `o'. */ - value |= ((value & S_IRUSR ? S_IRGRP | S_IROTH : 0) - | (value & S_IWUSR ? S_IWGRP | S_IROTH : 0) + value |= ( (value & S_IRUSR ? S_IRGRP | S_IROTH : 0) + | (value & S_IWUSR ? S_IWGRP | S_IWOTH : 0) | (value & S_IXUSR ? S_IXGRP | S_IXOTH : 0)); else if (changes->value & S_IRWXG) /* Copy `g' permissions onto `u' and `o'. */ - value |= ((value & S_IRGRP ? S_IRUSR | S_IROTH : 0) - | (value & S_IWGRP ? S_IWUSR | S_IROTH : 0) + value |= ( (value & S_IRGRP ? S_IRUSR | S_IROTH : 0) + | (value & S_IWGRP ? S_IWUSR | S_IWOTH : 0) | (value & S_IXGRP ? S_IXUSR | S_IXOTH : 0)); else /* Copy `o' permissions onto `u' and `g'. */ - value |= ((value & S_IROTH ? S_IRUSR | S_IRGRP : 0) - | (value & S_IWOTH ? S_IWUSR | S_IRGRP : 0) + value |= ( (value & S_IROTH ? S_IRUSR | S_IRGRP : 0) + | (value & S_IWOTH ? S_IWUSR | S_IWGRP : 0) | (value & S_IXOTH ? S_IXUSR | S_IXGRP : 0)); /* In order to change only `u', `g', or `o' permissions,