summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorskvidal <skvidal>2005-05-19 14:24:40 +0000
committerskvidal <skvidal>2005-05-19 14:24:40 +0000
commit4fe0b9451b87bd8f750f06b7a2f6ffd4a80a2516 (patch)
tree9c62b2b7dbe5ed87fc196c0713e9e504343534b6 /src
parent0ac5412e2c02b5f3f61ea05cc864c32e28d1351e (diff)
downloadmock-4fe0b9451b87bd8f750f06b7a2f6ffd4a80a2516.tar.gz
mock-4fe0b9451b87bd8f750f06b7a2f6ffd4a80a2516.tar.xz
mock-4fe0b9451b87bd8f750f06b7a2f6ffd4a80a2516.zip
- allow users other than uid=500,gid=500
- fix warnings in mock-helper - fix umount of proc and devpts
Diffstat (limited to 'src')
-rw-r--r--src/mock-helper.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mock-helper.c b/src/mock-helper.c
index 208d6bf..327061e 100644
--- a/src/mock-helper.c
+++ b/src/mock-helper.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <stdarg.h>
#include <stdlib.h>
+#include <string.h>
/* pull in configure'd defines */
char *rootsdir = ROOTSDIR;
@@ -199,7 +200,7 @@ do_chroot (int argc, char *argv[])
* allow proc mounts:
* mount -t proc proc (root)/proc
* allow devpts mounts:
- * mount -t devpts -o uid=500,gid=500 devpts (root)/dev/pts
+ * mount -t devpts devpts (root)/dev/pts
*/
void
do_mount (int argc, char *argv[])
@@ -219,14 +220,11 @@ do_mount (int argc, char *argv[])
else if ((strncmp ("-t", argv[2], 2) == 0) &&
(strncmp ("devpts", argv[3], 6) == 0))
{
- if (argc < 7)
+ if (argc < 5)
error ("devpts: not enough mount arguments");
- else if ((strncmp ("-o", argv[4], 2) != 0) ||
- (strncmp ("uid=500,gid=500", argv[5], 15) != 0))
- error ("devpts: unallowed mount options");
/* see if we're mounting devpts to somewhere in rootsdir */
- else if (strncmp (rootsdir, argv[7], strlen (rootsdir)) != 0)
- error ("devpts: mount not allowed on %s", argv[7]);
+ else if (strncmp (rootsdir, argv[5], strlen (rootsdir)) != 0)
+ error ("devpts: mount not allowed on %s", argv[5]);
}
else
error ("unallowed mount type");