mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-20 23:50:06 +00:00
transfused: add chmod event syscall
Signed-off-by: David Sheets <dsheets@docker.com>
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
#define MKDIR_SYSCALL 2
|
#define MKDIR_SYSCALL 2
|
||||||
#define SYMLINK_SYSCALL 3
|
#define SYMLINK_SYSCALL 3
|
||||||
#define TRUNCATE_SYSCALL 4
|
#define TRUNCATE_SYSCALL 4
|
||||||
|
#define CHMOD_SYSCALL 5
|
||||||
// these could be turned into an enum probably but... C standard nausea
|
// these could be turned into an enum probably but... C standard nausea
|
||||||
|
|
||||||
char * default_fusermount = DEFAULT_FUSERMOUNT;
|
char * default_fusermount = DEFAULT_FUSERMOUNT;
|
||||||
@@ -501,6 +502,11 @@ void perform_syscall(connection_t * conn, uint8_t syscall, char path[]) {
|
|||||||
r = truncate(path, 0);
|
r = truncate(path, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CHMOD_SYSCALL:
|
||||||
|
name = "chmod";
|
||||||
|
r = chmod(path, 0700);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
die(1, NULL, "Unknown event syscall %" PRIu8, syscall);
|
die(1, NULL, "Unknown event syscall %" PRIu8, syscall);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user