extras-buildsys-temp/src mach-helper.c,1.1.1.1,1.2
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Mon Apr 11 16:57:00 UTC 2005
Author: scop
Update of /cvs/fedora/extras-buildsys-temp/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15537/src
Modified Files:
mach-helper.c
Log Message:
Mount devpts in the buildroot.
Index: mach-helper.c
===================================================================
RCS file: /cvs/fedora/extras-buildsys-temp/src/mach-helper.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- mach-helper.c 21 Mar 2005 20:49:35 -0000 1.1.1.1
+++ mach-helper.c 11 Apr 2005 16:56:53 -0000 1.2
@@ -221,6 +221,8 @@
* mount -o bind (archivesdir) (root)/var/cache/apt/archives
* allow proc mounts:
* mount -t proc proc (root)/proc
+ * allow devpts mounts:
+ * mount -t devpts -o uid=500,gid=500 devpts (root)/dev/pts
*/
void
do_mount (int argc, char *argv[])
@@ -229,7 +231,7 @@
if (argc < 5)
error ("not enough arguments");
- /* see if it's -o bind or -t proc */
+ /* see if it's -o bind or -t proc or -t devpts */
if ((strncmp ("-o", argv[2], 2) == 0) && (strncmp ("bind", argv[3], 4) == 0))
{
/* see if it's the archivesdir */
@@ -243,6 +245,18 @@
if (strncmp (rootsdir, argv[5], strlen (rootsdir)) != 0)
error ("proc: mount not allowed on %s", argv[5]);
}
+ else if ((strncmp ("-t", argv[2], 2) == 0) &&
+ (strncmp ("devpts", argv[3], 6) == 0))
+ {
+ if (argc < 7)
+ 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
error ("unallowed mount type");
More information about the fedora-extras-commits
mailing list