diff options
Diffstat (limited to 'ports/linux/guts')
-rw-r--r-- | ports/linux/guts/__xmknodat.c | 3 | ||||
-rw-r--r-- | ports/linux/guts/openat.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ports/linux/guts/__xmknodat.c b/ports/linux/guts/__xmknodat.c index 59b4f2f..0888b8a 100644 --- a/ports/linux/guts/__xmknodat.c +++ b/ports/linux/guts/__xmknodat.c @@ -9,6 +9,9 @@ pseudo_msg_t *msg; struct stat64 buf; + /* mask out mode bits appropriately */ + mode = mode & ~pseudo_umask; + /* we don't use underlying call, so _ver is irrelevant to us */ (void) ver; diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c index 8460073..4053549 100644 --- a/ports/linux/guts/openat.c +++ b/ports/linux/guts/openat.c @@ -10,6 +10,9 @@ int existed = 1; int save_errno; + /* mask out mode bits appropriately */ + mode = mode & ~pseudo_umask; + #ifdef PSEUDO_NO_REAL_AT_FUNCTIONS if (dirfd != AT_FDCWD) { errno = ENOSYS; |