Merge pull request #55 from dsheets/transfused-events

transfused: add chmod event syscall
This commit is contained in:
David Sheets 2016-03-20 22:02:47 +00:00
commit 35215103f1

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);
}