summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootstrap.conf1
m---------gnulib0
-rw-r--r--src/mv.c4
-rw-r--r--src/rm.c4
4 files changed, 9 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 475dad496..d8c7013c6 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -160,6 +160,7 @@ gnulib_modules="
posix-shell
posixtm
posixver
+ priv-set
progname
propername
putenv
diff --git a/gnulib b/gnulib
-Subproject 9ccd438ce337e6fb8c95d9261f1e06a3952261c
+Subproject a771b77559753840d51609c779d526590e6a014
diff --git a/src/mv.c b/src/mv.c
index 061323632..8b9b6a111 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -32,6 +32,7 @@
#include "quote.h"
#include "remove.h"
#include "root-dev-ino.h"
+#include "priv-set.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "mv"
@@ -354,6 +355,9 @@ main (int argc, char **argv)
cp_option_init (&x);
+ /* Try to disable the ability to unlink a directory. */
+ priv_set_remove_linkdir ();
+
/* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
we'll actually use backup_suffix_string. */
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
diff --git a/src/rm.c b/src/rm.c
index 8fecfdd5f..a70c559e8 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -55,6 +55,7 @@
#include "remove.h"
#include "root-dev-ino.h"
#include "yesno.h"
+#include "priv-set.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "rm"
@@ -241,6 +242,9 @@ main (int argc, char **argv)
rm_option_init (&x);
+ /* Try to disable the ability to unlink a directory. */
+ priv_set_remove_linkdir ();
+
while ((c = getopt_long (argc, argv, "dfirvIR", long_opts, NULL)) != -1)
{
switch (c)