~sircmpwn/ctools

cda4cb8e521604357c86a113636e08e56cdd96dc — Drew DeVault 2 years ago fad6852
chmod: set default "who" values
1 files changed, 9 insertions(+), 0 deletions(-)

M src/chmod.c
M src/chmod.c => src/chmod.c +9 -0
@@ 155,12 155,21 @@ symbolic_mode(char *sym, mode_t *mode, enum mode_operation *op, bool *all_x)
			switch (sym[i]) {
			case '+':
				*op = MODE_ADD;
				if (who == 0) {
					who = 0777;
				}
				break;
			case '-':
				*op = MODE_REM;
				if (who == 0) {
					who = 0777;
				}
				break;
			case '=':
				*op = MODE_CLR;
				if (who == 0) {
					who = 0777;
				}
				break;
			default:
				goto error;