transfused: add chmod event syscall

Signed-off-by: David Sheets <dsheets@docker.com>
This commit is contained in:
David Sheets 2016-03-20 22:00:47 +00:00
parent 89ccf55ca8
commit a3b644ca5d

View File

@ -37,6 +37,7 @@
#define MKDIR_SYSCALL 2
#define SYMLINK_SYSCALL 3
#define TRUNCATE_SYSCALL 4
#define CHMOD_SYSCALL 5
// these could be turned into an enum probably but... C standard nausea
char * default_fusermount = DEFAULT_FUSERMOUNT;
@ -501,6 +502,11 @@ void perform_syscall(connection_t * conn, uint8_t syscall, char path[]) {
r = truncate(path, 0);
break;
case CHMOD_SYSCALL:
name = "chmod";
r = chmod(path, 0700);
break;
default:
die(1, NULL, "Unknown event syscall %" PRIu8, syscall);
}