summaryrefslogtreecommitdiff
path: root/chmod_chown_chgrp.c
diff options
context:
space:
mode:
authorEric Andersen1999-10-19 00:27:50 +0000
committerEric Andersen1999-10-19 00:27:50 +0000
commitabc7d597cb78a0ee3e92ecaeb73f6cbb2a3412bf (patch)
treebeefd109c47f20772f26fe2aa9830fbd9be52ea2 /chmod_chown_chgrp.c
parentb0e9a709ba1ae1724d413a77f5b67b1a3e6c6cb7 (diff)
downloadbusybox-abc7d597cb78a0ee3e92ecaeb73f6cbb2a3412bf.zip
busybox-abc7d597cb78a0ee3e92ecaeb73f6cbb2a3412bf.tar.gz
More stuff
Diffstat (limited to 'chmod_chown_chgrp.c')
-rw-r--r--chmod_chown_chgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index 27c02fe..cac09e7 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -71,7 +71,6 @@ int chmod_chown_chgrp_main(int argc, char **argv)
struct passwd *pwd;
int recursiveFlag=FALSE;
char *groupName;
- mode_t andWithMode= S_ISVTX|S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO;
whichApp = (strcmp(*argv, "chown")==0)? CHOWN_APP : (strcmp(*argv, "chmod")==0)? CHMOD_APP : CHGRP_APP;
@@ -100,6 +99,7 @@ int chmod_chown_chgrp_main(int argc, char **argv)
if ( whichApp == CHMOD_APP ) {
/* Find the specified modes */
+ mode &= S_ISVTX|S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO;
if ( parse_mode(*argv, &mode) == FALSE ) {
fprintf(stderr, "%s: Unknown mode: %s\n", invocationName, *argv);
exit( FALSE);