~sircmpwn/ctools

fad685200dd9fabe13454e998a90f5fcd3a35075 — Drew DeVault 2 years ago ac28f2c
chmod: fix error with clearing suid mask
1 files changed, 2 insertions(+), 2 deletions(-)

M src/chmod.c
M src/chmod.c => src/chmod.c +2 -2
@@ 14,7 14,7 @@
static void
usage(void)
{
	fprintf(stderr, "usage: chmod -R mode file...\n");
	fprintf(stderr, "usage: chmod [-R] mode file...\n");
}

enum mode_operation {


@@ 84,7 84,7 @@ process(enum mode_operation op, mode_t desired, const char *path,
				mode |= prev & suid_mask;
			}
		}
	} else if(r && !S_ISDIR(s.st_mode)) {
	} else if (r && !S_ISREG(s.st_mode)) {
		mode &= ~suid_mask;
	}