mock/src mock-helper.c,1.1.1.1,1.2

Seth Vidal (skvidal) fedora-extras-commits at redhat.com
Thu May 19 14:24:42 UTC 2005


Author: skvidal

Update of /cvs/fedora/mock/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2650/src

Modified Files:
	mock-helper.c 
Log Message:

- allow users other than uid=500,gid=500
- fix warnings in mock-helper
- fix umount of proc and devpts



Index: mock-helper.c
===================================================================
RCS file: /cvs/fedora/mock/src/mock-helper.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mock-helper.c	16 May 2005 02:44:01 -0000	1.1.1.1
+++ mock-helper.c	19 May 2005 14:24:40 -0000	1.2
@@ -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 @@
  * 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 @@
   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");




More information about the fedora-extras-commits mailing list