From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 00:40:02 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 729A216A4CE for ; Sun, 13 Mar 2005 00:40:02 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A2C843D5E for ; Sun, 13 Mar 2005 00:40:01 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2D0e1rF080856 for ; Sun, 13 Mar 2005 00:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2D0e1WE080855; Sun, 13 Mar 2005 00:40:01 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2005 00:40:01 GMT Resent-Message-Id: <200503130040.j2D0e1WE080855@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Erik Greenwald Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4324016A4CE for ; Sun, 13 Mar 2005 00:33:01 +0000 (GMT) Received: from phoenix.smluc.org (phoenix.smluc.org [12.28.48.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE66C43D2D for ; Sun, 13 Mar 2005 00:33:00 +0000 (GMT) (envelope-from erik@smluc.org) Received: by phoenix.smluc.org (Postfix, from userid 1000) id 2E1AB1CE55; Sat, 12 Mar 2005 18:33:42 -0600 (CST) Message-Id: <20050313003342.2E1AB1CE55@phoenix.smluc.org> Date: Sat, 12 Mar 2005 18:33:42 -0600 (CST) From: Erik Greenwald To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: erik@math.smsu.edu Subject: bin/78759: patch: verbosity for bin/chflags X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Erik Greenwald List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 00:40:02 -0000 >Number: 78759 >Category: bin >Synopsis: patch: verbosity for bin/chflags >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 00:40:01 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Erik Greenwald >Release: FreeBSD 5.3-RELEASE-p2 i386 >Organization: >Environment: FreeBSD vidar.br0kenland.org 6.0-CURRENT FreeBSD 6.0-CURRENT #9: Sun Mar 6 12:38:06 EST 2005 root@vidar.br0kenland.org:/usr/obj/usr/src/sys/VIDAR i386 >Description: this patch adds a -v option to bin/chflags. 2+ -v's will also print the "flags" variable (the names, like, say, "schg nodump" after the file name... it may be better to map out the actual changes and print those? *shrug* Man page and programs help have been updated to reflect. >How-To-Repeat: >Fix: --- bin_chflags.patch begins here --- Index: bin/chflags/chflags.1 =================================================================== RCS file: /home/ncvs/src/bin/chflags/chflags.1,v retrieving revision 1.23 diff -u -r1.23 chflags.1 --- bin/chflags/chflags.1 25 Feb 2005 00:40:46 -0000 1.23 +++ bin/chflags/chflags.1 13 Mar 2005 00:28:55 -0000 @@ -40,6 +40,7 @@ .Nd change file flags .Sh SYNOPSIS .Nm +.Op Fl v .Oo .Fl R .Op Fl H | Fl L | Fl P @@ -73,6 +74,11 @@ .It Fl R Change the file flags for the file hierarchies rooted in the files instead of just the files themselves. +.It Fl v +Cause +.Nm +to be move verbose, printing the name of the files as their flags are modified. +If specified more than once, the flags applied are printed as well. .El .Pp The flags are specified as an octal number or a comma separated list Index: bin/chflags/chflags.c =================================================================== RCS file: /home/ncvs/src/bin/chflags/chflags.c,v retrieving revision 1.22 diff -u -r1.22 chflags.c --- bin/chflags/chflags.c 10 Jan 2005 08:39:20 -0000 1.22 +++ bin/chflags/chflags.c 13 Mar 2005 00:28:55 -0000 @@ -62,11 +62,11 @@ FTSENT *p; u_long clear, set; long val; - int Hflag, Lflag, Rflag, ch, fts_options, oct, rval; + int Hflag, Lflag, Rflag, ch, fts_options, oct, rval, vflag; char *flags, *ep; - Hflag = Lflag = Rflag = 0; - while ((ch = getopt(argc, argv, "HLPR")) != -1) + Hflag = Lflag = Rflag = vflag = 0; + while ((ch = getopt(argc, argv, "HLPRv")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -82,6 +82,9 @@ case 'R': Rflag = 1; break; + case 'v': + vflag++; + break; case '?': default: usage(); @@ -151,6 +154,17 @@ default: break; } + + if (vflag) { + (void)printf("%s", p->fts_path); + /* + * Perhaps this should print the previous flags as well? + */ + if (vflag > 1) + (void)printf(": %s", flags); + (void)printf("\n"); + } + if (oct) { if (!chflags(p->fts_accpath, set)) continue; @@ -172,6 +186,6 @@ usage(void) { (void)fprintf(stderr, - "usage: chflags [-R [-H | -L | -P]] flags file ...\n"); + "usage: chflags [-v] [-R [-H | -L | -P]] flags file ...\n"); exit(1); } --- bin_chflags.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 02:20:05 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97A4416A4CE for ; Sun, 13 Mar 2005 02:20:05 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71DC243D39 for ; Sun, 13 Mar 2005 02:20:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2D2K5ZR092982 for ; Sun, 13 Mar 2005 02:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2D2K5MC092981; Sun, 13 Mar 2005 02:20:05 GMT (envelope-from gnats) Date: Sun, 13 Mar 2005 02:20:05 GMT Message-Id: <200503130220.j2D2K5MC092981@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Subject: Re: bin/78692: [PATCH] add support for line buffered output to sed(1) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 02:20:05 -0000 The following reply was made to PR bin/78692; it has been noted by GNATS. From: Giorgos Keramidas To: Eugene Grosbein Cc: bug-followup@freebsd.org Subject: Re: bin/78692: [PATCH] add support for line buffered output to sed(1) Date: Sun, 13 Mar 2005 04:16:42 +0200 On 2005-03-11 18:31, Eugene Grosbein wrote: > --- usr.bin/sed/sed.1.orig Fri Mar 11 18:27:47 2005 > +++ usr.bin/sed/sed.1 Fri Mar 11 18:29:37 2005 > @@ -43,11 +43,11 @@ > .Nd stream editor > .Sh SYNOPSIS > .Nm > -.Op Fl Ean > +.Op Fl Ealn > .Ar command > .Op Ar > .Nm > -.Op Fl Ean > +.Op Fl Ealn > .Op Fl e Ar command > .Op Fl f Ar command_file > .Op Fl i Ar extension > @@ -109,6 +109,8 @@ > .Ar extension > when in-place editing files, as you risk corruption or partial content > in situations where disk space is exhausted, etc. > +.It Fl l > +Make stdout line buffered. Hi, "stdout" is something that depends on an understanding of how stdio.h works in ANSI C. Since the executable of sed is pretty much language-agnostic and we can't expect all the users of FreeBSD to be C programmers, I'd probably write this as: .It Fl l Make output line buffered. Other than this minor detail, the manpage diff looks fine (as long as we don't forget to bump the date too when it is committed). From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 04:00:12 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A36116A4CF for ; Sun, 13 Mar 2005 04:00:12 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F388B43D41 for ; Sun, 13 Mar 2005 04:00:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2D40BFr002332 for ; Sun, 13 Mar 2005 04:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2D40BOx002326; Sun, 13 Mar 2005 04:00:11 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2005 04:00:11 GMT Resent-Message-Id: <200503130400.j2D40BOx002326@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christopher Hodgins Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0CD716A4CF for ; Sun, 13 Mar 2005 03:59:49 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96CFB43D1D for ; Sun, 13 Mar 2005 03:59:49 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2D3xng2098514 for ; Sun, 13 Mar 2005 03:59:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j2D3xnMV098513; Sun, 13 Mar 2005 03:59:49 GMT (envelope-from nobody) Message-Id: <200503130359.j2D3xnMV098513@www.freebsd.org> Date: Sun, 13 Mar 2005 03:59:49 GMT From: Christopher Hodgins To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: bin/78763: [PATCH] Added jail support to ps X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 04:00:12 -0000 >Number: 78763 >Category: bin >Synopsis: [PATCH] Added jail support to ps >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 04:00:11 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Christopher Hodgins >Release: 5.4-PRERELEASE >Organization: >Environment: FreeBSD paranoia 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Wed Mar 2 20:05:21 GMT 2005 root@paranoia:/usr/obj/usr/src/sys/paranoia i386 >Description: These patches add jail support to ps through the -J jid option. This is my first patch so I would appreciate it if you could let me know if I have made any mistakes. Thanks Chris >How-To-Repeat: >Fix: --- ps.c.orig Sun Mar 13 02:43:25 2005 +++ ps.c Sun Mar 13 02:55:06 2005 @@ -129,6 +129,7 @@ } l; }; +static void attach_to_jail(const char *jailid); static int check_procfs(void); static int addelem_gid(struct listinfo *, const char *); static int addelem_pid(struct listinfo *, const char *); @@ -160,7 +161,7 @@ "%cpu,%mem,command"; static char Zfmt[] = "label"; -#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" +#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" int main(int argc, char *argv[]) @@ -209,6 +210,18 @@ init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); memf = nlistf = _PATH_DEVNULL; + + /* + * Must catch the Jail ID option first, so that all + * of the other options run inside of the jail. + */ + if ((ch = getopt(argc, argv, "J:")) != -1) + if (ch != '?') + attach_to_jail(optarg); + + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, PS_ARGS)) != -1) switch ((char)ch) { case 'A': @@ -265,6 +278,8 @@ case 'h': prtheader = ws.ws_row > 5 ? ws.ws_row : 22; break; + case 'J': + break; case 'j': parsefmt(jfmt, 0); _fmt = 1; @@ -633,6 +648,20 @@ exit(eval); } +static void attach_to_jail(const char *jailid) { +int jid = -1; +char *ep; + + jid = strtol(jailid, &ep, 10); + if (!jailid || *ep) { + errx(1, "illegal jid: %s", jailid); + optfatal = 1; + } else if (jail_attach(jid) == -1) { + err(1, "jail_attach(): %d", jid); + optfatal = 1; + } +} + static int addelem_gid(struct listinfo *inf, const char *elem) { @@ -1205,7 +1234,7 @@ (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", - " [-M core] [-N system]", + " [-J jid] [-M core] [-N system]", " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", " ps [-L]"); exit(1); --- ps.1.orig Sun Mar 13 03:11:50 2005 +++ ps.1 Sun Mar 13 03:11:32 2005 @@ -140,6 +140,9 @@ .It Fl h Repeat the information header as often as necessary to guarantee one header per page of information. +.It Fl J +Display information in the jail specified by +.Cm jid . .It Fl j Print information associated with the following keywords: .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 04:30:08 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 410D816A4D5 for ; Sun, 13 Mar 2005 04:30:07 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25AD443D31 for ; Sun, 13 Mar 2005 04:30:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2D4U7hu011330 for ; Sun, 13 Mar 2005 04:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2D4U7Xa011329; Sun, 13 Mar 2005 04:30:07 GMT (envelope-from gnats) Date: Sun, 13 Mar 2005 04:30:07 GMT Message-Id: <200503130430.j2D4U7Xa011329@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Eugene Grosbein Subject: Re: bin/78692: [PATCH] add support for line buffered output to sed(1) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Eugene Grosbein List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 04:30:08 -0000 The following reply was made to PR bin/78692; it has been noted by GNATS. From: Eugene Grosbein To: Giorgos Keramidas Cc: bug-followup@freebsd.org Subject: Re: bin/78692: [PATCH] add support for line buffered output to sed(1) Date: Sun, 13 Mar 2005 11:28:49 +0700 > "stdout" is something that depends on an understanding of how stdio.h > works in ANSI C. Since the executable of sed is pretty much > language-agnostic and we can't expect all the users of FreeBSD to be C > programmers, I'd probably write this as: > > .It Fl l > Make output line buffered. That's nice. I just was too lazy and took description of '-l' from tcpdump(1) manual page :-) Eugene From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 05:50:03 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3416C16A4CF for ; Sun, 13 Mar 2005 05:50:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6D4443D41 for ; Sun, 13 Mar 2005 05:50:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2D5o2pK023333 for ; Sun, 13 Mar 2005 05:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2D5o2TT023332; Sun, 13 Mar 2005 05:50:02 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2005 05:50:02 GMT Resent-Message-Id: <200503130550.j2D5o2TT023332@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christopher Hodgins Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28BAD16A4CE for ; Sun, 13 Mar 2005 05:41:09 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB8C243D1D for ; Sun, 13 Mar 2005 05:41:08 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2D5f8xF036248 for ; Sun, 13 Mar 2005 05:41:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j2D5f8VV036247; Sun, 13 Mar 2005 05:41:08 GMT (envelope-from nobody) Message-Id: <200503130541.j2D5f8VV036247@www.freebsd.org> Date: Sun, 13 Mar 2005 05:41:08 GMT From: Christopher Hodgins To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: bin/78768: [Patch] Added jail support to top X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 05:50:03 -0000 >Number: 78768 >Category: bin >Synopsis: [Patch] Added jail support to top >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 05:50:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Christopher Hodgins >Release: 5.4-PRERELEASE >Organization: >Environment: FreeBSD paranoia 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Wed Mar 2 20:05:21 GMT 2005 root@paranoia:/usr/obj/usr/src/sys/paranoia i386 >Description: These patches add jail support to top through the -j jid option. This is my second patch so I would appreciate it if you could let me know if I have made any mistakes. Thanks Chris >How-To-Repeat: N/A >Fix: --- top.c.orig Sun Mar 13 05:32:21 2005 +++ top.c Sun Mar 13 03:55:12 2005 @@ -39,6 +39,7 @@ #include #include #include +#include /* includes specific to top */ #include "display.h" /* interface to display package */ @@ -137,6 +138,8 @@ int (*d_header)() = i_header; int (*d_process)() = i_process; +/* non-display routines that need to be pre-declared */ +static int attach_to_jail(const char *jailid); main(argc, argv) @@ -275,7 +278,23 @@ optind = 1; } - while ((i = getopt(ac, av, "SIHbinquvs:d:U:m:o:t")) != EOF) + /* + * Must catch the Jail ID option first, so that all + * of the other options run inside of the jail. + */ + opterr = 0; + if ((ch = getopt(argc, argv, "j:")) != -1) { + if (ch != '?') { + if (attach_to_jail(optarg) == -1) + exit(1); + } + } + + opterr = 1; + optind = 1; + optreset = 1; + + while ((i = getopt(ac, av, "SIHbinquvs:d:U:m:o:tj:")) != EOF) { switch(i) { @@ -387,11 +406,14 @@ case 'H': ps.thread = !ps.thread; break; + + case 'j': + break; default: fprintf(stderr, "\ Top version %s\n\ -Usage: %s [-HISbinqut] [-d x] [-s x] [-o field] [-U username] [number]\n", +Usage: %s [-HISbinqut] [-j jid] [-d x] [-s x] [-o field] [-U username] [number]\n", version_string(), myname); exit(1); } @@ -1045,6 +1067,21 @@ #endif quit(0); /*NOTREACHED*/ +} + +static int attach_to_jail(const char *jailid) { +int jid = -1; +char *ep; + + jid = strtol(jailid, &ep, 10); + if (!jailid || *ep) { + errx(1, "illegal jid: %s", jailid); + return (-1); + } else if (jail_attach(jid) == -1) { + err(1, "jail_attach(): %d", jid); + return (-1); + } + return (0); } /* --- top.1.orig Sun Mar 13 05:33:04 2005 +++ top.1 Sun Mar 13 05:37:26 2005 @@ -12,6 +12,8 @@ [ .B \-SbiInqutv ] [ +.BI \-j jid +] [ .BI \-d count ] [ .BI \-s time @@ -143,6 +145,10 @@ .IR username . This option currently only accepts usernames and will not understand uid numbers. +.TP +.BI \-j jid +Show only those processes in jail +.IR jid . .PP Both .I count >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 06:00:19 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42A9816A4CE for ; Sun, 13 Mar 2005 06:00:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0079E43D2D for ; Sun, 13 Mar 2005 06:00:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2D60IRI024612 for ; Sun, 13 Mar 2005 06:00:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2D60I0F024611; Sun, 13 Mar 2005 06:00:18 GMT (envelope-from gnats) Date: Sun, 13 Mar 2005 06:00:18 GMT Message-Id: <200503130600.j2D60I0F024611@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Chris Hodgins Subject: Re: bin/78763: [PATCH] Added jail support to ps X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Chris Hodgins List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 06:00:19 -0000 The following reply was made to PR bin/78763; it has been noted by GNATS. From: Chris Hodgins To: Christopher Hodgins Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/78763: [PATCH] Added jail support to ps Date: Sun, 13 Mar 2005 06:01:37 +0000 Christopher Hodgins wrote: >>Number: 78763 >>Category: bin >>Synopsis: [PATCH] Added jail support to ps >>Confidential: no >>Severity: non-critical >>Priority: low >>Responsible: freebsd-bugs >>State: open >>Quarter: >>Keywords: >>Date-Required: >>Class: update >>Submitter-Id: current-users >>Arrival-Date: Sun Mar 13 04:00:11 GMT 2005 >>Closed-Date: >>Last-Modified: >>Originator: Christopher Hodgins >>Release: 5.4-PRERELEASE >>Organization: >>Environment: > > FreeBSD paranoia 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Wed Mar 2 20:05:21 GMT 2005 root@paranoia:/usr/obj/usr/src/sys/paranoia i386 > > >>Description: > > These patches add jail support to ps through the -J jid option. > > This is my first patch so I would appreciate it if you could let me know if I have made any mistakes. > > Thanks > Chris > >>How-To-Repeat: > > >>Fix: > > --- ps.c.orig Sun Mar 13 02:43:25 2005 > +++ ps.c Sun Mar 13 02:55:06 2005 > @@ -129,6 +129,7 @@ > } l; > }; > > +static void attach_to_jail(const char *jailid); > static int check_procfs(void); > static int addelem_gid(struct listinfo *, const char *); > static int addelem_pid(struct listinfo *, const char *); > @@ -160,7 +161,7 @@ > "%cpu,%mem,command"; > static char Zfmt[] = "label"; > > -#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" > +#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" > > int > main(int argc, char *argv[]) > @@ -209,6 +210,18 @@ > init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); > init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); > memf = nlistf = _PATH_DEVNULL; > + > + /* > + * Must catch the Jail ID option first, so that all > + * of the other options run inside of the jail. > + */ > + if ((ch = getopt(argc, argv, "J:")) != -1) > + if (ch != '?') > + attach_to_jail(optarg); > + > + optind = 1; > + optreset = 1; > + > while ((ch = getopt(argc, argv, PS_ARGS)) != -1) > switch ((char)ch) { > case 'A': > @@ -265,6 +278,8 @@ > case 'h': > prtheader = ws.ws_row > 5 ? ws.ws_row : 22; > break; > + case 'J': > + break; > case 'j': > parsefmt(jfmt, 0); > _fmt = 1; > @@ -633,6 +648,20 @@ > exit(eval); > } > > +static void attach_to_jail(const char *jailid) { > +int jid = -1; > +char *ep; > + > + jid = strtol(jailid, &ep, 10); > + if (!jailid || *ep) { > + errx(1, "illegal jid: %s", jailid); > + optfatal = 1; > + } else if (jail_attach(jid) == -1) { > + err(1, "jail_attach(): %d", jid); > + optfatal = 1; > + } > +} > + > static int > addelem_gid(struct listinfo *inf, const char *elem) > { > @@ -1205,7 +1234,7 @@ > > (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", > "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", > - " [-M core] [-N system]", > + " [-J jid] [-M core] [-N system]", > " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", " ps [-L]"); > exit(1); > > > --- ps.1.orig Sun Mar 13 03:11:50 2005 > +++ ps.1 Sun Mar 13 03:11:32 2005 > @@ -140,6 +140,9 @@ > .It Fl h > Repeat the information header as often as necessary to guarantee one > header per page of information. > +.It Fl J > +Display information in the jail specified by > +.Cm jid . > .It Fl j > Print information associated with the following keywords: > .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , > > >>Release-Note: >>Audit-Trail: >>Unformatted: > The ps man page diff is missing the -J jid option from the argument list at the start. Here is the corrected diff: --- ps.1.orig Sun Mar 13 03:11:50 2005 +++ ps.1 Sun Mar 13 06:00:47 2005 @@ -40,6 +40,7 @@ .Op Fl aCcefHhjlmrSTuvwXxZ .Op Fl O Ar fmt | Fl o Ar fmt .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... +.Op Fl J Ar jid .Op Fl M Ar core .Op Fl N Ar system .Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ... @@ -140,6 +141,9 @@ .It Fl h Repeat the information header as often as necessary to guarantee one header per page of information. +.It Fl J +Display information in the jail specified by +.Cm jid . .It Fl j Print information associated with the following keywords: .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , Thanks Chris From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 11:11:10 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2631816A4CE; Sun, 13 Mar 2005 11:11:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F117743D3F; Sun, 13 Mar 2005 11:11:09 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from freefall.freebsd.org (dougb@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2DBB9gn096127; Sun, 13 Mar 2005 11:11:09 GMT (envelope-from dougb@freefall.freebsd.org) Received: (from dougb@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2DBB96v096123; Sun, 13 Mar 2005 11:11:09 GMT (envelope-from dougb) Date: Sun, 13 Mar 2005 11:11:09 GMT From: Doug Barton Message-Id: <200503131111.j2DBB96v096123@freefall.freebsd.org> To: dougb@FreeBSD.org, freebsd-bugs@FreeBSD.org, dougb@FreeBSD.org Subject: Re: conf/75722: [patch] /usr/libexec/save-entropy ignores entropy_save_sz X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 11:11:10 -0000 Synopsis: [patch] /usr/libexec/save-entropy ignores entropy_save_sz Responsible-Changed-From-To: freebsd-bugs->dougb Responsible-Changed-By: dougb Responsible-Changed-When: Sun Mar 13 11:10:50 GMT 2005 Responsible-Changed-Why: I wrote this script http://www.freebsd.org/cgi/query-pr.cgi?pr=75722 From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 12:31:33 2005 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93E1F16A4CE for ; Sun, 13 Mar 2005 12:31:33 +0000 (GMT) Received: from smtphost.cis.strath.ac.uk (smtphost.cis.strath.ac.uk [130.159.196.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id AADA743D4C for ; Sun, 13 Mar 2005 12:31:32 +0000 (GMT) (envelope-from chodgins@cis.strath.ac.uk) Received: from [192.168.0.4] (chrishodgins.force9.co.uk [84.92.20.141]) j2DCVMNU012564; Sun, 13 Mar 2005 12:31:22 GMT Message-ID: <423433E2.5080209@cis.strath.ac.uk> Date: Sun, 13 Mar 2005 12:36:50 +0000 From: Chris Hodgins User-Agent: Mozilla Thunderbird 1.0 (X11/20050204) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chris Hodgins References: <200503130600.j2D60I0F024611@freefall.freebsd.org> In-Reply-To: <200503130600.j2D60I0F024611@freefall.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CIS-MailScanner-Information: Please contact support@cis.strath.ac.uk for more information X-CIS-MailScanner: Found to be clean X-CIS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.9, required 6, autolearn=not spam, BAYES_00 -4.90) X-CIS-MailScanner-From: chodgins@cis.strath.ac.uk cc: freebsd-bugs@freebsd.org Subject: Re: bin/78763: [PATCH] Added jail support to ps X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 12:31:33 -0000 Chris Hodgins wrote: > The following reply was made to PR bin/78763; it has been noted by GNATS. > > From: Chris Hodgins > To: Christopher Hodgins > Cc: freebsd-gnats-submit@freebsd.org > Subject: Re: bin/78763: [PATCH] Added jail support to ps > Date: Sun, 13 Mar 2005 06:01:37 +0000 > > Christopher Hodgins wrote: > >>Number: 78763 > >>Category: bin > >>Synopsis: [PATCH] Added jail support to ps > >>Confidential: no > >>Severity: non-critical > >>Priority: low > >>Responsible: freebsd-bugs > >>State: open > >>Quarter: > >>Keywords: > >>Date-Required: > >>Class: update > >>Submitter-Id: current-users > >>Arrival-Date: Sun Mar 13 04:00:11 GMT 2005 > >>Closed-Date: > >>Last-Modified: > >>Originator: Christopher Hodgins > >>Release: 5.4-PRERELEASE > >>Organization: > >>Environment: > > > > FreeBSD paranoia 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Wed Mar 2 20:05:21 GMT 2005 root@paranoia:/usr/obj/usr/src/sys/paranoia i386 > > > > > >>Description: > > > > These patches add jail support to ps through the -J jid option. > > > > This is my first patch so I would appreciate it if you could let me know if I have made any mistakes. > > > > Thanks > > Chris > > > >>How-To-Repeat: > > > > > >>Fix: > > > > --- ps.c.orig Sun Mar 13 02:43:25 2005 > > +++ ps.c Sun Mar 13 02:55:06 2005 > > @@ -129,6 +129,7 @@ > > } l; > > }; > > > > +static void attach_to_jail(const char *jailid); > > static int check_procfs(void); > > static int addelem_gid(struct listinfo *, const char *); > > static int addelem_pid(struct listinfo *, const char *); > > @@ -160,7 +161,7 @@ > > "%cpu,%mem,command"; > > static char Zfmt[] = "label"; > > > > -#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" > > +#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" > > > > int > > main(int argc, char *argv[]) > > @@ -209,6 +210,18 @@ > > init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); > > init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); > > memf = nlistf = _PATH_DEVNULL; > > + > > + /* > > + * Must catch the Jail ID option first, so that all > > + * of the other options run inside of the jail. > > + */ > > + if ((ch = getopt(argc, argv, "J:")) != -1) > > + if (ch != '?') > > + attach_to_jail(optarg); > > + > > + optind = 1; > > + optreset = 1; > > + > > while ((ch = getopt(argc, argv, PS_ARGS)) != -1) > > switch ((char)ch) { > > case 'A': > > @@ -265,6 +278,8 @@ > > case 'h': > > prtheader = ws.ws_row > 5 ? ws.ws_row : 22; > > break; > > + case 'J': > > + break; > > case 'j': > > parsefmt(jfmt, 0); > > _fmt = 1; > > @@ -633,6 +648,20 @@ > > exit(eval); > > } > > > > +static void attach_to_jail(const char *jailid) { > > +int jid = -1; > > +char *ep; > > + > > + jid = strtol(jailid, &ep, 10); > > + if (!jailid || *ep) { > > + errx(1, "illegal jid: %s", jailid); > > + optfatal = 1; > > + } else if (jail_attach(jid) == -1) { > > + err(1, "jail_attach(): %d", jid); > > + optfatal = 1; > > + } > > +} > > + > > static int > > addelem_gid(struct listinfo *inf, const char *elem) > > { > > @@ -1205,7 +1234,7 @@ > > > > (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", > > "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", > > - " [-M core] [-N system]", > > + " [-J jid] [-M core] [-N system]", > > " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", " ps [-L]"); > > exit(1); > > > > > > --- ps.1.orig Sun Mar 13 03:11:50 2005 > > +++ ps.1 Sun Mar 13 03:11:32 2005 > > @@ -140,6 +140,9 @@ > > .It Fl h > > Repeat the information header as often as necessary to guarantee one > > header per page of information. > > +.It Fl J > > +Display information in the jail specified by > > +.Cm jid . > > .It Fl j > > Print information associated with the following keywords: > > .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , > > > > > >>Release-Note: > >>Audit-Trail: > >>Unformatted: > > > > The ps man page diff is missing the -J jid option from the argument list > at the start. Here is the corrected diff: > > --- ps.1.orig Sun Mar 13 03:11:50 2005 > +++ ps.1 Sun Mar 13 06:00:47 2005 > @@ -40,6 +40,7 @@ > .Op Fl aCcefHhjlmrSTuvwXxZ > .Op Fl O Ar fmt | Fl o Ar fmt > .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... > +.Op Fl J Ar jid > .Op Fl M Ar core > .Op Fl N Ar system > .Op Fl p Ar pid Ns Op , Ns Ar pid Ns Ar ... > @@ -140,6 +141,9 @@ > .It Fl h > Repeat the information header as often as necessary to guarantee one > header per page of information. > +.It Fl J > +Display information in the jail specified by > +.Cm jid . > .It Fl j > Print information associated with the following keywords: > .Cm user , pid , ppid , pgid , sid , jobc , state , tt , time , > > > Thanks > Chris > This catches a problem with an error message appearing twice. Use this patch instead. Chris --- ps.c.orig Sun Mar 13 02:43:25 2005 +++ ps.c Sun Mar 13 12:24:30 2005 @@ -129,6 +129,7 @@ } l; }; +static void attach_to_jail(const char *jailid); static int check_procfs(void); static int addelem_gid(struct listinfo *, const char *); static int addelem_pid(struct listinfo *, const char *); @@ -160,7 +161,7 @@ "%cpu,%mem,command"; static char Zfmt[] = "label"; -#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" +#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjJ:LlM:mN:O:o:p:rSTt:U:uvwXxZ" int main(int argc, char *argv[]) @@ -209,6 +210,20 @@ init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty"); init_list(&uidlist, addelem_uid, sizeof(uid_t), "user"); memf = nlistf = _PATH_DEVNULL; + + /* + * Must catch the Jail ID option first, so that all + * of the other options run inside of the jail. + */ + opterr = 0; + if ((ch = getopt(argc, argv, "J:")) != -1) + if (ch != '?') + attach_to_jail(optarg); + + opterr = 1; + optind = 1; + optreset = 1; + while ((ch = getopt(argc, argv, PS_ARGS)) != -1) switch ((char)ch) { case 'A': @@ -265,6 +280,8 @@ case 'h': prtheader = ws.ws_row > 5 ? ws.ws_row : 22; break; + case 'J': + break; case 'j': parsefmt(jfmt, 0); _fmt = 1; @@ -633,6 +650,20 @@ exit(eval); } +static void attach_to_jail(const char *jailid) { +int jid; +char *ep; + + jid = strtol(jailid, &ep, 10); + if (!jailid || *ep) { + errx(1, "illegal jid: %s", jailid); + optfatal = 1; + } else if (jail_attach(jid) == -1) { + err(1, "jail_attach(): %d", jid); + optfatal = 1; + } +} + static int addelem_gid(struct listinfo *inf, const char *elem) { @@ -1205,7 +1236,7 @@ (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: ps " SINGLE_OPTS " [-O fmt | -o fmt] [-G gid[,gid...]]", - " [-M core] [-N system]", + " [-J jid] [-M core] [-N system]", " [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]", " ps [-L]"); exit(1); From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 14:00:07 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B631016A4CE for ; Sun, 13 Mar 2005 14:00:07 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7013B43D4C for ; Sun, 13 Mar 2005 14:00:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2DE07IT012622 for ; Sun, 13 Mar 2005 14:00:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2DE07rt012621; Sun, 13 Mar 2005 14:00:07 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2005 14:00:07 GMT Resent-Message-Id: <200503131400.j2DE07rt012621@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andrea Venturoli Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3CEC16A4CE for ; Sun, 13 Mar 2005 13:50:46 +0000 (GMT) Received: from parrot.aev.net (host29-15.pool8174.interbusiness.it [81.74.15.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D95143D41 for ; Sun, 13 Mar 2005 13:50:45 +0000 (GMT) (envelope-from andrea@netfence.it) Received: from soth.ventu (adsl-125-24.37-151.net24.it [151.37.24.125]) (authenticated bits=128) by parrot.aev.net (8.13.1/8.13.1) with ESMTP id j2DE8jmi089855 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 13 Mar 2005 15:08:52 +0100 (CET) (envelope-from andrea@netfence.it) Received: from soth.ventu (localhost [127.0.0.1]) by soth.ventu (8.13.3/8.13.1) with ESMTP id j2DDnIc5018240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 13 Mar 2005 14:49:18 +0100 (CET) (envelope-from andrea@soth.ventu) Received: (from andrea@localhost) by soth.ventu (8.13.1/8.13.1/Submit) id j2DDnIZY018239; Sun, 13 Mar 2005 14:49:18 +0100 (CET) (envelope-from andrea) Message-Id: <200503131349.j2DDnIZY018239@soth.ventu> Date: Sun, 13 Mar 2005 14:49:18 +0100 (CET) From: Andrea Venturoli To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/78785: [patch] ipfw verbosity locks machine if /etc/rc.firewall is run remotely X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrea Venturoli List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 14:00:07 -0000 >Number: 78785 >Category: bin >Synopsis: [patch] ipfw verbosity locks machine if /etc/rc.firewall is run remotely >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 14:00:06 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andrea Venturoli >Release: FreeBSD 5.3-RELEASE-p5 i386 >Organization: NetFence >Environment: System: FreeBSD soth.ventu 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #1: Mon Feb 28 00:34:36 CET 2005 root@soth.ventu:/usr/obj/usr/src/sys/SOTH i386 >Description: Running "sh /etc/rc.firewall" remotely (e.g. over ssh) locks the machine out if a preprocessor is used. First, rules are flushed, then they should be reloaded, but -p option outputs "command is ..." even if -q option is used. This result in session disconnection *before* rules are actually reloaded, so only the default deny will be there. It is then oviously impossible to login again. Notice that using screen (from the port tree) is a viable workaround, when no console access is possible. 4.x machines are not affected, unless ipfw2 is used instead of ipfw; all 5.x and later boxes use ipfw2, so should exhibit this problem, though I can only confirm this for 5.3. >How-To-Repeat: (Be sure either to have console access or to schedule a reboot before you begin). Put the following line in /etc/rc.conf: firewall_flags="-q -p /usr/bin/somepreprocessor" Login remotely and issue "sh /etc/rc.firewall". >Fix: As said above, use /usr/ports/misc/screen. Alternatively, here is a patch for /usr/src/sbin/ipfw/ipfw2.c (this is for 5.3p5 (ipfw2.c,v 1.54.2.3), but so simple that it should not be difficult to adapt it to newer revisions): 4031c4031,4032 < fprintf(stderr, "command is %s\n", av[0]); --- > if (!do_quiet) > fprintf(stderr, "command is %s\n", av[0]); You will need to specify -q *before* -p. (This again would not too be difficult to fix). >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 14:40:03 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BBD216A4CE for ; Sun, 13 Mar 2005 14:40:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED0B643D75 for ; Sun, 13 Mar 2005 14:40:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2DEe2fN019164 for ; Sun, 13 Mar 2005 14:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2DEe2tA019163; Sun, 13 Mar 2005 14:40:02 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2005 14:40:02 GMT Resent-Message-Id: <200503131440.j2DEe2tA019163@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pete French Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 753AC16A4CE for ; Sun, 13 Mar 2005 14:35:54 +0000 (GMT) Received: from mail.ticketswitch.com (mail.ticketswitch.com [194.200.93.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0BBC43D5C for ; Sun, 13 Mar 2005 14:35:53 +0000 (GMT) (envelope-from petefrench@ticketswitch.com) Received: from [172.16.1.6] (helo=dilbert.firstcallgroup.co.uk) by mail.ticketswitch.com with esmtp (Exim 4.50 (FreeBSD)) id 1DAUC5-000JVM-Rn for FreeBSD-gnats-submit@freebsd.org; Sun, 13 Mar 2005 14:35:49 +0000 Received: from petefrench by dilbert.firstcallgroup.co.uk with local (Exim 4.43 (FreeBSD)) id 1DAUC1-0002RC-9C for FreeBSD-gnats-submit@freebsd.org; Sun, 13 Mar 2005 14:35:45 +0000 Message-Id: Date: Sun, 13 Mar 2005 14:35:45 +0000 From: Pete French To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/78787: sysconf(_SC_CLK_TCK) may return incorrect value X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pete French List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 14:40:03 -0000 >Number: 78787 >Category: kern >Synopsis: sysconf(_SC_CLK_TCK) may return incorrect value >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 14:40:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Pete French >Release: FreeBSD 4.11-RELEASE i386 >Organization: TicketSwitch Limited >Environment: System: FreeBSD dilbert.rattatosk 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Wed Jan 26 12:22:35 GMT 2005 petefrench@dilbert.rattatosk:/usr/obj/usr/src/sys/DILBERT i386 >Description: sysconf(_SC_CLK_TCK) returns a contstant value defined in src/sys/i386/include/ansi.h this is not correct as the actual value of the statistics clock is not a constnat. In particular it is 100Hz on my system, but the constant returned is 128. The stat clock may be 100Hz is apm is enabled with flags 0x20 in the kernel file >How-To-Repeat: Build a kernel which has a statistics clock other tahn 128 and observe that sysconf(_SC_CLK_TCK) returns the wrong value! >Fix: The call to sysconf(_SC_CLK_TCK) should actuallyy query the kernel to get the correct value. Note that this is how /usr/bin/time gets the frequency of the clock. I have included below an analysis of the problem done by someone else on the FreeBSD stable mailing lists, which follwos the code through in more depth. I do not know if this problem still exists in 5 or CURRENT. Response from Jon Noack to my query on -stable ------------------------------------------------------------------- I infer from your kern.clockrate output that you are running 4.x. Why does sysconf(_SC_CLK_TCK) always returns 128? Check out sysconf() in src/lib/libc/gen/sysconf.c (lines 83-84 of rev. 1.10): ********************************************************************** case _SC_CLK_TCK: return (CLK_TCK); ********************************************************************** CLK_TCK is defined in src/include/time.h (line 52 of rev. 1.15): ********************************************************************** #define CLK_TCK _BSD_CLK_TCK_ ********************************************************************** _BSD_CLK_TCK_ is defined in src/sys/i386/include/ansi.h (line 101 of rev. 1.18.2.4): ********************************************************************** #define _BSD_CLK_TCK_ 128 ********************************************************************** So on i386 (and FreeBSD 4.x), sysconf(_SC_CLK_TCK) will always return 128. If you look in src/sys/alpha/include/ansi.h, you'll see that on alpha it will always return 100. To determine how stathz can vary, we'll have to dig deeper. Check out initclocks() in src/sys/kern/kern_clock.c (lines 196-213 of rev. 1.105.2.11): ********************************************************************** /* * Set divisors to 1 (normal case) and let the machine-specific * code do its bit. */ psdiv = pscnt = 1; cpu_initclocks(); #ifdef DEVICE_POLLING init_device_poll(); #endif /* * Compute profhz/stathz, and fix profhz if needed. */ i = stathz ? stathz : hz; if (profhz == 0) profhz = i; psratio = profhz / i; ********************************************************************** stathz and profhz are originally set by cpu_initclocks() (which is MD). If they are not set at this point, hz is used. This must be the case for some of your machines as both stathz and profhz equal hz. So why aren't stathz and profhz being set earlier? Check out cpu_initclocks() in src/sys/i386/isa/clock.c (lines 995-1008 of rev. 1.149.2.6): ********************************************************************** if (statclock_disable) { /* * The stat interrupt mask is different without the * statistics clock. Also, don't set the interrupt * flag which would normally cause the RTC to generate * interrupts. */ stat_imask = HWI_MASK | SWI_MASK; rtc_statusb = RTCSB_24HR; } else { /* Setting stathz to nonzero early helps avoid races. */ stathz = RTC_NOPROFRATE; profhz = RTC_PROFRATE; } ********************************************************************** If you look in src/sys/isa/rtc.h, you'll see that RTC_NOPROFRATE=128 and RTC_PROFRATE=1024. The only way stathz and profhz will not be set here is if statclock_disable is true. Where is statclock_disable set? Check out apm_attach() in src/sys/i386/apm/apm.c (lines 1032-1033 of rev. 1.114.2.6): ********************************************************************** if (flags & 0x20) statclock_disable = 1; ********************************************************************** Thus, you must have "device apm0 flags 0x20" or something similar in your kernel config file for you to get stathz and profhz as 100. apm is disabled in GENERIC, so by default this is not a problem; apm_attach won't be called if apm is disabled, so the fact that GENERIC includes "flags 0x20" is irrelevant. Jon >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 15:20:03 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A00516A4CE for ; Sun, 13 Mar 2005 15:20:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 229F843D55 for ; Sun, 13 Mar 2005 15:20:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2DFK3vx024231 for ; Sun, 13 Mar 2005 15:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2DFK2wI024230; Sun, 13 Mar 2005 15:20:02 GMT (envelope-from gnats) Resent-Date: Sun, 13 Mar 2005 15:20:02 GMT Resent-Message-Id: <200503131520.j2DFK2wI024230@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nicolas DEFFAYET Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1893316A4CE for ; Sun, 13 Mar 2005 15:19:35 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE98C43D2F for ; Sun, 13 Mar 2005 15:19:34 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2DFJYgF019968 for ; Sun, 13 Mar 2005 15:19:34 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j2DFJYTV019967; Sun, 13 Mar 2005 15:19:34 GMT (envelope-from nobody) Message-Id: <200503131519.j2DFJYTV019967@www.freebsd.org> Date: Sun, 13 Mar 2005 15:19:34 GMT From: Nicolas DEFFAYET To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/78791: xl input errors and speed problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 15:20:03 -0000 >Number: 78791 >Category: kern >Synopsis: xl input errors and speed problem >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 13 15:20:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Nicolas DEFFAYET >Release: 5.3-RELEASE-p5 >Organization: >Environment: FreeBSD router 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #0: Thu Feb 3 18:12:27 CET 2005 nicolas@router:/usr/src/sys/i386/compile/20050203-fb53 i386 >Description: The machine is a router with 3 network card 3COM 3C905B. Many configuration settings have been tested without success (router interface and switch configured with autonegocation or with 100-full). The cable is good, have been changed and tested with Waveteak tool. The speed is very slow: $ wget ftp://ftp.oleane.net/pub/debian-cd/images/3.0_r4/i386/debian-30r4-i386-binary-1.iso --15:57:48-- ftp://ftp.oleane.net/pub/debian-cd/images/3.0_r4/i386/debian-30r4-i386-binary-1.iso => `debian-30r4-i386-binary-1.iso' Resolving ftp.oleane.net... done. Connecting to ftp.oleane.net[194.2.0.36]:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /pub/debian-cd/images/3.0_r4/i386 ... done. ==> PASV ... done. ==> RETR debian-30r4-i386-binary-1.iso ... done. Length: 600,158,208 (unauthoritative) 0% [ ] 3,844,392 32.76K/s ETA 4:56:14 and there is a lot of input errors: $ netstat -I xl0 Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll xl0 1500 00:04:75:d9:71:ab 296231311 245239 271395708 12 0 xl0 1500 fe80:3::204:7 fe80:3::204:75ff: 0 - 4 - - All tests have been done on the router. It's not a problem of slow upstream, the router is connected on a 100Mbps/s dedicated link and it's work fine with Netgear GA620 network card. >How-To-Repeat: Install a 3COM 3C905B and download a file from a FTP server. You will get a lot of input errors and the download will be very slow. >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 17:03:35 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 12EF716A4CE; Sun, 13 Mar 2005 17:03:35 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE30A43D39; Sun, 13 Mar 2005 17:03:34 +0000 (GMT) (envelope-from vs@FreeBSD.org) Received: from freefall.freebsd.org (vs@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2DH3YcD034832; Sun, 13 Mar 2005 17:03:34 GMT (envelope-from vs@freefall.freebsd.org) Received: (from vs@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2DH3Ycb034828; Sun, 13 Mar 2005 17:03:34 GMT (envelope-from vs) Date: Sun, 13 Mar 2005 17:03:34 GMT From: Volker Stolz Message-Id: <200503131703.j2DH3Ycb034828@freefall.freebsd.org> To: vs@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/78371: Philips Wearable Audio Player (128) fails to attach X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 17:03:35 -0000 Synopsis: Philips Wearable Audio Player (128) fails to attach Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: vs Responsible-Changed-When: Sun Mar 13 17:02:47 GMT 2005 Responsible-Changed-Why: Usb-issue http://www.freebsd.org/cgi/query-pr.cgi?pr=78371 From owner-freebsd-bugs@FreeBSD.ORG Sun Mar 13 21:10:05 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D074A16A4CE for ; Sun, 13 Mar 2005 21:10:05 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 902A543D49 for ; Sun, 13 Mar 2005 21:10:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2DLA5cQ066236 for ; Sun, 13 Mar 2005 21:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2DLA57E066235; Sun, 13 Mar 2005 21:10:05 GMT (envelope-from gnats) Date: Sun, 13 Mar 2005 21:10:05 GMT Message-Id: <200503132110.j2DLA57E066235@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: security@jim-liesl.org Subject: Re: kern/78707: New nvidia MCP2S chipset SATA no supported by 5.3 release X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: security@jim-liesl.org List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 21:10:05 -0000 The following reply was made to PR kern/78707; it has been noted by GNATS. From: security@daemon.jim-liesl.org To: freebsd-gnats-submit@FreeBSD.org, security@jim-liesl.org Cc: Subject: Re: kern/78707: New nvidia MCP2S chipset SATA no supported by 5.3 release Date: Sun, 13 Mar 2005 14:05:35 -0700 fixes based on 75540 diff -Naur sys/dev/ata/ata-pci.h.orig sys/dev/ata/ata-pci.h --- sys/dev/ata/ata-pci.h.orig Thu Mar 10 14:02:23 2005 +++ sys/dev/ata/ata-pci.h Sun Mar 13 12:18:14 2005 @@ -132,6 +132,7 @@ #define ATA_NFORCE1 0x01bc10de #define ATA_NFORCE2 0x006510de #define ATA_NFORCE2_MCP 0x008510de +#define ATA_NFORCE2_MCP_S2 0x008e10de #define ATA_NFORCE3 0x00d510de #define ATA_NFORCE3_PRO 0x00e510de #define ATA_NFORCE3_PRO_S1 0x00e310de diff -Naur sys/dev/ata/ata-chipset.c.orig sys/dev/ata/ata-chipset.c --- sys/dev/ata/ata-chipset.c.orig Sun Mar 13 12:20:03 2005 +++ sys/dev/ata/ata-chipset.c Sun Mar 13 12:57:03 2005 @@ -1112,6 +1112,7 @@ {{ ATA_NFORCE1, 0, AMDNVIDIA, NVIDIA, ATA_UDMA5, "nVidia nForce" }, { ATA_NFORCE2, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2" }, { ATA_NFORCE2_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce2 MCP" }, + { ATA_NFORCE2_MCP_S2, 0, AMDNVIDIA, NVIDIA, ATA_SA150, "nVidia nForce2 MCP_S2" }, { ATA_NFORCE3, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3" }, { ATA_NFORCE3_PRO, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 Pro" }, { ATA_NFORCE3_MCP, 0, AMDNVIDIA, NVIDIA, ATA_UDMA6, "nVidia nForce3 MCP" }, @@ -2861,9 +2862,17 @@ static int ata_check_80pin(struct ata_device *atadev, int mode) { + device_t parent = device_get_parent(atadev->channel->dev); + struct ata_pci_controller *ctlr = device_get_softc(parent); + + if (mode >= ATA_UDMA2 && mode < ATA_SA150 && ctlr->chip->max_dma >= ATA_SA150) { + ata_prtdev(atadev,"DMA set to SA150 for any device attached to SATA controller\n"); + return ATA_SA150; + } + if (mode > ATA_UDMA2 && !(atadev->param->hwres & ATA_CABLE_ID)) { ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n"); - mode = ATA_UDMA2; + return ATA_UDMA2; } return mode; } ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 14 00:00:15 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3BF616A4CF for ; Mon, 14 Mar 2005 00:00:15 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8227B43D46 for ; Mon, 14 Mar 2005 00:00:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2E00Ffg081684 for ; Mon, 14 Mar 2005 00:00:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2E00FMD081681; Mon, 14 Mar 2005 00:00:15 GMT (envelope-from gnats) Resent-Date: Mon, 14 Mar 2005 00:00:15 GMT Resent-Message-Id: <200503140000.j2E00FMD081681@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hugo Mion Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7D3A16A4CE for ; Sun, 13 Mar 2005 23:55:04 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FE3143D58 for ; Sun, 13 Mar 2005 23:55:04 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2DNt4Ya078767 for ; Sun, 13 Mar 2005 23:55:04 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j2DNt4c4078763; Sun, 13 Mar 2005 23:55:04 GMT (envelope-from nobody) Message-Id: <200503132355.j2DNt4c4078763@www.freebsd.org> Date: Sun, 13 Mar 2005 23:55:04 GMT From: Hugo Mion To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/78800: GNOME can not start X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 00:00:15 -0000 >Number: 78800 >Category: misc >Synopsis: GNOME can not start >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 14 00:00:14 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Hugo Mion >Release: 5.3 >Organization: self >Environment: everytime I run gnome-session I get the message "(gnome-session:some #):Gtk-WARNING **: cannot open display:" >Description: >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 14 02:00:10 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03CA016A4CE for ; Mon, 14 Mar 2005 02:00:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83C2A43D48 for ; Mon, 14 Mar 2005 02:00:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2E209oM094928 for ; Mon, 14 Mar 2005 02:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2E209Ca094927; Mon, 14 Mar 2005 02:00:09 GMT (envelope-from gnats) Resent-Date: Mon, 14 Mar 2005 02:00:09 GMT Resent-Message-Id: <200503140200.j2E209Ca094927@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mario Sergio Fujikawa Ferreira Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C002516A4CE for ; Mon, 14 Mar 2005 01:58:46 +0000 (GMT) Received: from vette.gigo.com (vette.gigo.com [216.218.228.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BD7443D53 for ; Mon, 14 Mar 2005 01:58:46 +0000 (GMT) (envelope-from lioux@uol.com.br) Received: from 200.163.11.172 (unknown [200.163.11.172]) by vette.gigo.com (Postfix) with ESMTP id D9683546A for ; Sun, 13 Mar 2005 17:58:42 -0800 (PST) Received: (qmail 71110 invoked by uid 1001); 14 Mar 2005 01:57:11 -0000 Message-Id: <20050314015711.71040.qmail@exxodus.fedaykin.here> Date: 14 Mar 2005 01:57:11 -0000 From: Mario Sergio Fujikawa Ferreira To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: Daniel Eischen Subject: kern/78801: ping: sendto: No buffer space available X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mario Sergio Fujikawa Ferreira List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 02:00:10 -0000 >Number: 78801 >Category: kern >Synopsis: ping: sendto: No buffer space available >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 14 02:00:09 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Mario Sergio Fujikawa Ferreira >Release: FreeBSD 5.4-PRERELEASE i386 >Organization: >Environment: System: FreeBSD exxodus.fedaykin.here 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Fri Mar 4 01:52:24 BRT 2005 lioux@exxodus:/usr/obj/usr/src/sys/LIOUX i386 Motherboard: MSI KT880 Delta Information taken exactly while problem was occuring. MAC addresses and IPs sanitized $ ifconfig -a fxp0: flags=19843 mtu 1500 options=4b inet 10.1.1.2 netmask 0xffffff80 broadcast 10.0.0.127 ether 00:00:00:00:00:00 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 $ netstat -m 1347 mbufs in use 835/25600 mbuf clusters in use (current/max) 0/38/6656 sfbufs in use (current/peak/max) 2006 KBytes allocated to network 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 2732 calls to protocol drain routines $ cat /var/run/dmesg.boot Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.4-PRERELEASE #0: Fri Mar 4 01:52:24 BRT 2005 lioux@exxodus:/usr/obj/usr/src/sys/LIOUX Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) XP 2600+ (1917.81-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x6a0 Stepping = 0 Features=0x383fbff AMD Features=0xc0400000 real memory = 2146697216 (2047 MB) avail memory = 2095230976 (1998 MB) ACPI APIC Table: MADT: Forcing active-low polarity and level trigger for SCI ioapic0 irqs 0-23 on motherboard npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 cpu0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: mem 0xe0000000-0xefffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 drm0: mem 0xfe000000-0xfe7fffff,0xfeafc000-0xfeafffff,0xfa000000-0xfbffffff irq 16 at device 0.0 on pci1 info: [drm] AGP at 0xe0000000 256MB info: [drm] Initialized mga 3.1.0 20021029 on minor 0 bktr0: mem 0xfd9fe000-0xfd9fefff irq 19 at device 7.0 on pci0 smbus0: on bktr0 iicbb0: on bktr0 iicbus0: on iicbb0 master-only iicsmb0: on iicbus0 smbus1: on iicsmb0 bktr0: Hauppauge Model 44001 C110 bktr0: Hauppauge WinCast/TV. pci0: at device 7.1 (no driver attached) fxp0: port 0xb800-0xb83f mem 0xfebc0000-0xfebdffff,0xfebfe000-0xfebfefff irq 18 at device 8.0 on pci0 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:02:b3:2d:b2:de pci0: at device 10.0 (no driver attached) pci0: