CVS commit: src/sbin/mount_ptyfs

2014-08-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Aug 13 15:48:38 UTC 2014

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

Log Message:
Adapt to reality -- already open BSD style nodes do not appear on
ptyfs mounts (this changed some months ago).


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

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.13 src/sbin/mount_ptyfs/mount_ptyfs.8:1.14
--- src/sbin/mount_ptyfs/mount_ptyfs.8:1.13	Fri Apr  4 21:19:35 2014
+++ src/sbin/mount_ptyfs/mount_ptyfs.8	Wed Aug 13 15:48:38 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_ptyfs.8,v 1.13 2014/04/04 21:19:35 christos Exp $
+.\	$NetBSD: mount_ptyfs.8,v 1.14 2014/08/13 15:48:38 hannken Exp $
 .\
 .\
 .\ Copyright (c) 2004, 2014 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 April 4, 2014
+.Dd August 13, 2014
 .Dt MOUNT_PTYFS 8
 .Os
 .Sh NAME
@@ -57,8 +57,7 @@ at boot time.
 .Pp
 The filesystem contains pseudo-terminal slave device nodes which are
 allocated dynamically via
-.Xr ptm 4 ,
-or they are already open via traditional BSD style ptys.
+.Xr ptm 4 .
 .Pp
 The options are as follows:
 .Bl -tag -width indent



CVS commit: src/sbin/mount_ptyfs

2014-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr  4 21:19:35 UTC 2014

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

Log Message:
the bug has been fixed.


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

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.12 src/sbin/mount_ptyfs/mount_ptyfs.8:1.13
--- src/sbin/mount_ptyfs/mount_ptyfs.8:1.12	Wed Sep 19 11:38:09 2012
+++ src/sbin/mount_ptyfs/mount_ptyfs.8	Fri Apr  4 17:19:35 2014
@@ -1,7 +1,7 @@
-.\	$NetBSD: mount_ptyfs.8,v 1.12 2012/09/19 15:38:09 christos Exp $
+.\	$NetBSD: mount_ptyfs.8,v 1.13 2014/04/04 21:19:35 christos Exp $
 .\
 .\
-.\ Copyright (c) 2004 The NetBSD Foundation, Inc.
+.\ Copyright (c) 2004, 2014 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ This code is derived from software contributed to The NetBSD Foundation
@@ -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 19, 2012
+.Dd April 4, 2014
 .Dt MOUNT_PTYFS 8
 .Os
 .Sh NAME
@@ -102,6 +102,3 @@ The
 .Nm
 utility first appeared in
 .Nx 3.0 .
-.Sh BUGS
-When multiple instances are mounted, they all display the union of the ptys
-used in each instance, not just the ones used in the particular instance.



CVS commit: src/sbin/mount_ptyfs

2012-09-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Sep 20 18:56:05 UTC 2012

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

Log Message:
add back old options for compatibility, but complain if specified.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 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.c
diff -u src/sbin/mount_ptyfs/mount_ptyfs.c:1.14 src/sbin/mount_ptyfs/mount_ptyfs.c:1.15
--- src/sbin/mount_ptyfs/mount_ptyfs.c:1.14	Tue Sep 18 17:35:43 2012
+++ src/sbin/mount_ptyfs/mount_ptyfs.c	Thu Sep 20 14:56:05 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_ptyfs.c,v 1.14 2012/09/18 21:35:43 christos Exp $	*/
+/*	$NetBSD: mount_ptyfs.c,v 1.15 2012/09/20 18:56:05 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.14 2012/09/18 21:35:43 christos Exp $);
+__RCSID($NetBSD: mount_ptyfs.c,v 1.15 2012/09/20 18:56:05 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -100,12 +100,14 @@ __RCSID($NetBSD: mount_ptyfs.c,v 1.14 2
 
 #define ALTF_GROUP	0x1
 #define ALTF_MODE	0x2
+#define ALTF_CHROOT	0x4			/* compat */
 
 static const struct mntopt mopts[] = {
 	MOPT_STDOPTS,
 	MOPT_GETARGS,
 	{ group, 0, ALTF_GROUP, 1 },
 	{ mode, 0, ALTF_MODE, 1 },
+	{ chroot, 0, ALTF_CHROOT, 1 },	/* compat */
 	MOPT_NULL,
 };
 
@@ -163,8 +165,12 @@ mount_ptyfs(int argc, char *argv[])
 	args.mode = S_IRUSR|S_IWUSR|S_IWGRP;
 	args.flags = 0;
 
-	while ((ch = getopt(argc, argv, g:m:o:)) != -1)
+	while ((ch = getopt(argc, argv, cg:m:o:)) != -1)
 		switch (ch) {
+		case 'c':	/* compat */
+		compat:
+			warnx(-c and -o chroot options are obsolete);
+			break;
 		case 'o':
 			altflags = 0;
 			mp = getmntopts(optarg, mopts, mntflags, altflags);
@@ -174,6 +180,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)
+goto compat;
 			freemntopts(mp);
 			break;
 		case 'g':



CVS commit: src/sbin/mount_ptyfs

2012-09-18 Thread Christos Zoulas
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);
 }



CVS commit: src/sbin/mount_ptyfs

2012-09-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Sep  9 17:09:51 UTC 2012

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

Log Message:
ptyfs hasn't been experimental in a long time. (noticed by blymn)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/mount_ptyfs/mount_ptyfs.8

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.8 src/sbin/mount_ptyfs/mount_ptyfs.8:1.9
--- src/sbin/mount_ptyfs/mount_ptyfs.8:1.8	Wed Mar 18 10:46:58 2009
+++ src/sbin/mount_ptyfs/mount_ptyfs.8	Sun Sep  9 17:09:51 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_ptyfs.8,v 1.8 2009/03/18 10:46:58 wiz Exp $
+.\	$NetBSD: mount_ptyfs.8,v 1.9 2012/09/09 17:09:51 dholland Exp $
 .\
 .\
 .\ Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -112,4 +112,3 @@ utility first appeared in
 .Nx 3.0 .
 .Sh BUGS
 This filesystem may not be NFS-exported.
-This filesystem is experimental.



CVS commit: src/sbin/mount_ptyfs

2012-09-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Sep  9 17:11:49 UTC 2012

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

Log Message:
Bump date for previous.


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

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.9 src/sbin/mount_ptyfs/mount_ptyfs.8:1.10
--- src/sbin/mount_ptyfs/mount_ptyfs.8:1.9	Sun Sep  9 17:09:51 2012
+++ src/sbin/mount_ptyfs/mount_ptyfs.8	Sun Sep  9 17:11:49 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount_ptyfs.8,v 1.9 2012/09/09 17:09:51 dholland Exp $
+.\	$NetBSD: mount_ptyfs.8,v 1.10 2012/09/09 17:11:49 wiz 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 March 15, 2009
+.Dd September 9, 2012
 .Dt MOUNT_PTYFS 8
 .Os
 .Sh NAME



CVS commit: src/sbin/mount_ptyfs

2012-04-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  2 21:08:02 UTC 2012

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

Log Message:
don't print 2 lines of info, remove the bogus one.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 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.c
diff -u src/sbin/mount_ptyfs/mount_ptyfs.c:1.12 src/sbin/mount_ptyfs/mount_ptyfs.c:1.13
--- src/sbin/mount_ptyfs/mount_ptyfs.c:1.12	Mon Aug 29 10:35:02 2011
+++ src/sbin/mount_ptyfs/mount_ptyfs.c	Mon Apr  2 17:08:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_ptyfs.c,v 1.12 2011/08/29 14:35:02 joerg Exp $	*/
+/*	$NetBSD: mount_ptyfs.c,v 1.13 2012/04/02 21:08:02 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.12 2011/08/29 14:35:02 joerg Exp $);
+__RCSID($NetBSD: mount_ptyfs.c,v 1.13 2012/04/02 21:08:02 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -212,7 +212,6 @@ mount_ptyfs(int argc, char *argv[])
 	if (mntflags  MNT_GETARGS) {
 		char buf[1024];
 		(void)snprintb(buf, sizeof(buf), PTYFSMNT_BITS, args.flags);
-		printf(version=%d, flags=%s\n, args.version, buf);
 		printf(version=%d, gid=%lu, mode=0%o flags=%s\n, args.version,
 		(unsigned long)args.gid, args.mode, buf);
 	}



CVS commit: src/sbin/mount_ptyfs

2010-06-14 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jun 14 14:42:49 UTC 2010

Modified Files:
src/sbin/mount_ptyfs: Makefile

Log Message:
naughty naughty, don't peek into src/sys


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/mount_ptyfs/Makefile

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/Makefile
diff -u src/sbin/mount_ptyfs/Makefile:1.4 src/sbin/mount_ptyfs/Makefile:1.5
--- src/sbin/mount_ptyfs/Makefile:1.4	Thu Nov 25 14:10:28 2004
+++ src/sbin/mount_ptyfs/Makefile	Mon Jun 14 14:42:49 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2004/11/25 14:10:28 wiz Exp $
+#	$NetBSD: Makefile,v 1.5 2010/06/14 14:42:49 pooka Exp $
 #	@(#)Makefile	8.2 (Berkeley) 3/27/94
 
 .include bsd.own.mk
@@ -7,8 +7,6 @@
 SRCS=	mount_ptyfs.c
 MAN=	mount_ptyfs.8
 
-CPPFLAGS+= -I${NETBSDSRCDIR}/sys
-
 DPADD+=${LIBUTIL}
 LDADD+=-lutil