Module Name:    src
Committed By:   christos
Date:           Tue Sep 18 21:35:43 UTC 2012

Modified Files:
        src/sbin/mount_ptyfs: mount_ptyfs.8 mount_ptyfs.c

Log Message:
remove -c and chroot option; they are always on now


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/mount_ptyfs/mount_ptyfs.8
cvs rdiff -u -r1.13 -r1.14 src/sbin/mount_ptyfs/mount_ptyfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/mount_ptyfs/mount_ptyfs.8
diff -u src/sbin/mount_ptyfs/mount_ptyfs.8:1.10 src/sbin/mount_ptyfs/mount_ptyfs.8:1.11
--- src/sbin/mount_ptyfs/mount_ptyfs.8:1.10	Sun Sep  9 13:11:49 2012
+++ src/sbin/mount_ptyfs/mount_ptyfs.8	Tue Sep 18 17:35:43 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_ptyfs.8,v 1.10 2012/09/09 17:11:49 wiz Exp $
+.\"	$NetBSD: mount_ptyfs.8,v 1.11 2012/09/18 21:35:43 christos Exp $
 .\"
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd September 9, 2012
+.Dd September 18, 2012
 .Dt MOUNT_PTYFS 8
 .Os
 .Sh NAME
@@ -36,7 +36,6 @@
 .Nd mount the /dev/pts file system
 .Sh SYNOPSIS
 .Nm
-.Op Fl c
 .Op Fl g Ar group|gid
 .Op Fl m Ar mode
 .Op Fl o Ar options
@@ -63,10 +62,6 @@ or they are already open via traditional
 .Pp
 The options are as follows:
 .Bl -tag -width indent
-.It Fl c
-Allows
-.Ar ptyfs
-to be mounted inside a chrooted environment.
 .It Fl g Ar group|gid
 Specify the group ownership of the slave pseudo-tty.
 .It Fl m Ar mode
@@ -80,9 +75,6 @@ flag followed by a comma separated strin
 .Pp
 .Nm
 specific options are
-.Dv chroot
-which corresponds to
-.Fl c ,
 .Dv group
 which corresponds to
 .Fl g ,
@@ -112,3 +104,4 @@ utility first appeared in
 .Nx 3.0 .
 .Sh BUGS
 This filesystem may not be NFS-exported.
+Multiple instances are not allowed.

Index: src/sbin/mount_ptyfs/mount_ptyfs.c
diff -u src/sbin/mount_ptyfs/mount_ptyfs.c:1.13 src/sbin/mount_ptyfs/mount_ptyfs.c:1.14
--- src/sbin/mount_ptyfs/mount_ptyfs.c:1.13	Mon Apr  2 17:08:02 2012
+++ src/sbin/mount_ptyfs/mount_ptyfs.c	Tue Sep 18 17:35:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_ptyfs.c,v 1.13 2012/04/02 21:08:02 christos Exp $	*/
+/*	$NetBSD: mount_ptyfs.c,v 1.14 2012/09/18 21:35:43 christos Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994
@@ -77,7 +77,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19
 #if 0
 static char sccsid[] = "@(#)mount_ptyfs.c	8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: mount_ptyfs.c,v 1.13 2012/04/02 21:08:02 christos Exp $");
+__RCSID("$NetBSD: mount_ptyfs.c,v 1.14 2012/09/18 21:35:43 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -100,14 +100,12 @@ __RCSID("$NetBSD: mount_ptyfs.c,v 1.13 2
 
 #define ALTF_GROUP	0x1
 #define ALTF_MODE	0x2
-#define ALTF_CHROOT	0x4
 
 static const struct mntopt mopts[] = {
 	MOPT_STDOPTS,
 	MOPT_GETARGS,
 	{ "group", 0, ALTF_GROUP, 1 },
 	{ "mode", 0, ALTF_MODE, 1 },
-	{ "chroot", 0, ALTF_CHROOT, 1 },
 	MOPT_NULL,
 };
 
@@ -165,7 +163,7 @@ mount_ptyfs(int argc, char *argv[])
 	args.mode = S_IRUSR|S_IWUSR|S_IWGRP;
 	args.flags = 0;
 
-	while ((ch = getopt(argc, argv, "cg:m:o:")) != -1)
+	while ((ch = getopt(argc, argv, "g:m:o:")) != -1)
 		switch (ch) {
 		case 'o':
 			altflags = 0;
@@ -176,13 +174,8 @@ mount_ptyfs(int argc, char *argv[])
 				args.gid = getgrp(getmntoptstr(mp, "group"));
 			if (altflags & ALTF_MODE)
 				args.mode = (mode_t)getmntoptnum(mp, "mode");
-			if (altflags & ALTF_CHROOT)
-				args.flags |= PTYFSMNT_CHROOT;
 			freemntopts(mp);
 			break;
-		case 'c':
-			args.flags |= PTYFSMNT_CHROOT;
-			break;
 		case 'g':
 			args.gid = getgrp(optarg);
 			break;
@@ -210,10 +203,8 @@ mount_ptyfs(int argc, char *argv[])
 	if (mount(MOUNT_PTYFS, canon_dir, mntflags, &args, sizeof args) == -1)
 		err(1, "ptyfs on %s", canon_dir);
 	if (mntflags & MNT_GETARGS) {
-		char buf[1024];
-		(void)snprintb(buf, sizeof(buf), PTYFSMNT_BITS, args.flags);
-		printf("version=%d, gid=%lu, mode=0%o flags=%s\n", args.version,
-		    (unsigned long)args.gid, args.mode, buf);
+		printf("version=%d, gid=%lu, mode=0%o\n", args.version,
+		    (unsigned long)args.gid, args.mode);
 	}
 	return 0;
 }
@@ -222,7 +213,7 @@ static void
 usage(void)
 {
 	(void)fprintf(stderr,
-	    "Usage: %s [-c] [-g <group|gid>] [-m <mode>] [-o options] "
+	    "Usage: %s [-g <group|gid>] [-m <mode>] [-o options] "
 	    "ptyfs mountpoint\n", getprogname());
 	exit(1);
 }

Reply via email to