use ISVTX instead of ISUID for append-only directories
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Thu, 16 Feb 1984 02:12:08 +0000 (18:12 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Thu, 16 Feb 1984 02:12:08 +0000 (18:12 -0800)
SCCS-vsn: sys/kern/vfs_lookup.c 6.6
SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 6.6
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 6.6

usr/src/sys/kern/vfs_lookup.c
usr/src/sys/ufs/ffs/ufs_lookup.c
usr/src/sys/ufs/ufs/ufs_lookup.c

index d67da7c..1b4d239 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_lookup.c    6.5     84/01/04        */
+/*     vfs_lookup.c    6.6     84/02/15        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -583,12 +583,12 @@ found:
                                        goto bad;
                                }
                                /*
                                        goto bad;
                                }
                                /*
-                                * If directory is setuid, then user must own
+                                * If directory is "sticky", then user must own
                                 * the directory, or the file in it, else he
                                 * may not delete it (unless he's root). This
                                 * implements append-only directories.
                                 */
                                 * the directory, or the file in it, else he
                                 * may not delete it (unless he's root). This
                                 * implements append-only directories.
                                 */
-                               if ((u.u_pdir->i_mode & ISUID) &&
+                               if ((u.u_pdir->i_mode & ISVTX) &&
                                    u.u_uid != 0 &&
                                    u.u_uid != u.u_pdir->i_uid &&
                                    dp->i_uid != u.u_uid) {
                                    u.u_uid != 0 &&
                                    u.u_uid != u.u_pdir->i_uid &&
                                    dp->i_uid != u.u_uid) {
index 0c74b71..fbe6a24 100644 (file)
@@ -1,4 +1,4 @@
-/*     ufs_lookup.c    6.5     84/01/04        */
+/*     ufs_lookup.c    6.6     84/02/15        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -583,12 +583,12 @@ found:
                                        goto bad;
                                }
                                /*
                                        goto bad;
                                }
                                /*
-                                * If directory is setuid, then user must own
+                                * If directory is "sticky", then user must own
                                 * the directory, or the file in it, else he
                                 * may not delete it (unless he's root). This
                                 * implements append-only directories.
                                 */
                                 * the directory, or the file in it, else he
                                 * may not delete it (unless he's root). This
                                 * implements append-only directories.
                                 */
-                               if ((u.u_pdir->i_mode & ISUID) &&
+                               if ((u.u_pdir->i_mode & ISVTX) &&
                                    u.u_uid != 0 &&
                                    u.u_uid != u.u_pdir->i_uid &&
                                    dp->i_uid != u.u_uid) {
                                    u.u_uid != 0 &&
                                    u.u_uid != u.u_pdir->i_uid &&
                                    dp->i_uid != u.u_uid) {
index 0c74b71..fbe6a24 100644 (file)
@@ -1,4 +1,4 @@
-/*     ufs_lookup.c    6.5     84/01/04        */
+/*     ufs_lookup.c    6.6     84/02/15        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -583,12 +583,12 @@ found:
                                        goto bad;
                                }
                                /*
                                        goto bad;
                                }
                                /*
-                                * If directory is setuid, then user must own
+                                * If directory is "sticky", then user must own
                                 * the directory, or the file in it, else he
                                 * may not delete it (unless he's root). This
                                 * implements append-only directories.
                                 */
                                 * the directory, or the file in it, else he
                                 * may not delete it (unless he's root). This
                                 * implements append-only directories.
                                 */
-                               if ((u.u_pdir->i_mode & ISUID) &&
+                               if ((u.u_pdir->i_mode & ISVTX) &&
                                    u.u_uid != 0 &&
                                    u.u_uid != u.u_pdir->i_uid &&
                                    dp->i_uid != u.u_uid) {
                                    u.u_uid != 0 &&
                                    u.u_uid != u.u_pdir->i_uid &&
                                    dp->i_uid != u.u_uid) {