[PATCH] set sticky bit when creating /var/tmp mount-point
Dear list,
partition_config::mount_partition() uses mode 01777 when creating /tmp
as a mount-point, but doesn't for /target/var/tmp. A fix is:
Index: boot-floppies/utilities/dbootstrap/partition_config.c
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/partition_config.c,v
retrieving revision 1.116
diff -u -r1.116 partition_config.c
--- boot-floppies/utilities/dbootstrap/partition_config.c 2001/11/11 01:00:33 1.116
+++ boot-floppies/utilities/dbootstrap/partition_config.c 2001/11/13 09:36:48
@@ -572,7 +572,9 @@
while (1) {
if ((p = strchr(p + 1, '/')) != NULL)
*p = '\0';
- WithMode = strcmp(real_mount_point,"/target/tmp") ? 0755 : 01777;
+ WithMode = strcmp(real_mount_point,"/target/tmp") &&
+ strcmp(real_mount_point,"/target/var/tmp")
+ ? 0755 : 01777;
DEBUGMSG("making mount point %s", real_mount_point);
if (! mkdir(real_mount_point, WithMode)) {
chmod(real_mount_point, WithMode);
Regards,
Mark.
Reply to: