From 6449b66e2241ff3e5064b139ce88f311b0b03d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 3 Aug 2008 16:30:30 +0000 Subject: [PATCH] * As pointed out by Andreas, the previous patch wasn't really correct; ALLPERMS should really contain all permission bits. * It now uses S_ISVTX instead of S_ISTXT - this is how it works in Linux as well, while FreeBSD uses S_ISTXT there (but S_ISTXT and S_ISVTX have the same value there, too). * Also fixed the fs_shell this time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26761 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/sys/stat.h | 4 ++-- headers/private/fs_shell/fssh_stat.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/headers/posix/sys/stat.h b/headers/posix/sys/stat.h index 7451813771..fea135f8ac 100644 --- a/headers/posix/sys/stat.h +++ b/headers/posix/sys/stat.h @@ -72,7 +72,7 @@ struct stat { #define S_ISUID 04000 /* set user id on execution */ #define S_ISGID 02000 /* set group id on execution */ -#define S_ISVTX 01000 /* save swapped text even after use */ +#define S_ISVTX 01000 /* save swapped text even after use (sticky bit) */ #define S_IRWXU 00700 /* read, write, execute: owner */ #define S_IRUSR 00400 /* read permission: owner */ @@ -93,7 +93,7 @@ struct stat { #define S_IEXEC S_IXUSR #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) -#define ALLPERMS (S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO) +#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) #define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* default file mode, everyone can read/write */ diff --git a/headers/private/fs_shell/fssh_stat.h b/headers/private/fs_shell/fssh_stat.h index ea72633152..492c70777c 100644 --- a/headers/private/fs_shell/fssh_stat.h +++ b/headers/private/fs_shell/fssh_stat.h @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007, Haiku Inc. All Rights Reserved. + * Copyright 2002-2008, Haiku Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef _FSSH_SYS_STAT_H_ @@ -72,7 +72,7 @@ typedef struct fssh_stat fssh_struct_stat; #define FSSH_S_ISUID 04000 /* set user id on execution */ #define FSSH_S_ISGID 02000 /* set group id on execution */ -#define FSSH_S_ISVTX 01000 /* save swapped text even after use */ +#define FSSH_S_ISVTX 01000 /* save swapped text even after use (sticky bit) */ #define FSSH_S_IRWXU 00700 /* read, write, execute: owner */ #define FSSH_S_IRUSR 00400 /* read permission: owner */ @@ -88,7 +88,7 @@ typedef struct fssh_stat fssh_struct_stat; #define FSSH_S_IXOTH 00001 /* execute permission: other */ #define FSSH_ACCESSPERMS (FSSH_S_IRWXU | FSSH_S_IRWXG | FSSH_S_IRWXO) -#define FSSH_ALLPERMS (FSSH_S_ISUID | FSSH_S_ISGID | FSSH_S_ISTXT \ +#define FSSH_ALLPERMS (FSSH_S_ISUID | FSSH_S_ISGID | FSSH_S_ISVTX \ | FSSH_S_IRWXU | FSSH_S_IRWXG | FSSH_S_IRWXO) #define FSSH_DEFFILEMODE (FSSH_S_IRUSR | FSSH_S_IWUSR | FSSH_S_IRGRP \ | FSSH_S_IWGRP | FSSH_S_IROTH | FSSH_S_IWOTH)