From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 14:01:57 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D09A7F34; Sun, 16 Dec 2012 14:01:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B48FA8FC0A; Sun, 16 Dec 2012 14:01:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGE1vV6088148; Sun, 16 Dec 2012 14:01:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGE1u4i088141; Sun, 16 Dec 2012 14:01:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201212161401.qBGE1u4i088141@svn.freebsd.org> From: Rick Macklem Date: Sun, 16 Dec 2012 14:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244289 - in stable/9/sys: fs/nfs fs/nfsclient nfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 14:01:57 -0000 Author: rmacklem Date: Sun Dec 16 14:01:56 2012 New Revision: 244289 URL: http://svnweb.freebsd.org/changeset/base/244289 Log: MFC: r243782 Add an nfssvc() option to the kernel for the new NFS client which dumps out the actual options being used by an NFS mount. This will be used to add a "-m" option to nfsstat(1). Modified: stable/9/sys/fs/nfs/nfs_var.h stable/9/sys/fs/nfsclient/nfs_clport.c stable/9/sys/fs/nfsclient/nfs_clvfsops.c stable/9/sys/nfs/nfs_nfssvc.c stable/9/sys/nfs/nfssvc.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/9/sys/fs/nfs/nfs_var.h Sun Dec 16 13:56:38 2012 (r244288) +++ stable/9/sys/fs/nfs/nfs_var.h Sun Dec 16 14:01:56 2012 (r244289) @@ -313,6 +313,7 @@ void nfsd_init(void); int nfsd_checkrootexp(struct nfsrv_descript *); /* nfs_clvfsops.c */ +void nfscl_retopts(struct nfsmount *, char *, size_t); /* nfs_commonport.c */ int nfsrv_checksockseqnum(struct socket *, tcp_seq); Modified: stable/9/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clport.c Sun Dec 16 13:56:38 2012 (r244288) +++ stable/9/sys/fs/nfsclient/nfs_clport.c Sun Dec 16 14:01:56 2012 (r244289) @@ -1207,6 +1207,9 @@ nfssvc_nfscl(struct thread *td, struct n struct nfscbd_args nfscbdarg; struct nfsd_nfscbd_args nfscbdarg2; int error; + struct nameidata nd; + struct nfscl_dumpmntopts dumpmntopts; + char *buf; if (uap->flag & NFSSVC_CBADDSOCK) { error = copyin(uap->argp, (caddr_t)&nfscbdarg, sizeof(nfscbdarg)); @@ -1239,6 +1242,28 @@ nfssvc_nfscl(struct thread *td, struct n if (error) return (error); error = nfscbd_nfsd(td, &nfscbdarg2); + } else if (uap->flag & NFSSVC_DUMPMNTOPTS) { + error = copyin(uap->argp, &dumpmntopts, sizeof(dumpmntopts)); + if (error == 0 && (dumpmntopts.ndmnt_blen < 256 || + dumpmntopts.ndmnt_blen > 1024)) + error = EINVAL; + if (error == 0) + error = nfsrv_lookupfilename(&nd, + dumpmntopts.ndmnt_fname, td); + if (error == 0 && strcmp(nd.ni_vp->v_mount->mnt_vfc->vfc_name, + "nfs") != 0) { + vput(nd.ni_vp); + error = EINVAL; + } + if (error == 0) { + buf = malloc(dumpmntopts.ndmnt_blen, M_TEMP, M_WAITOK); + nfscl_retopts(VFSTONFS(nd.ni_vp->v_mount), buf, + dumpmntopts.ndmnt_blen); + vput(nd.ni_vp); + error = copyout(buf, dumpmntopts.ndmnt_buf, + dumpmntopts.ndmnt_blen); + free(buf, M_TEMP); + } } else { error = EINVAL; } Modified: stable/9/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvfsops.c Sun Dec 16 13:56:38 2012 (r244288) +++ stable/9/sys/fs/nfsclient/nfs_clvfsops.c Sun Dec 16 14:01:56 2012 (r244289) @@ -1630,3 +1630,105 @@ nfs_getnlminfo(struct vnode *vp, uint8_t } } +/* + * This function prints out an option name, based on the conditional + * argument. + */ +static __inline void nfscl_printopt(struct nfsmount *nmp, int testval, + char *opt, char **buf, size_t *blen) +{ + int len; + + if (testval != 0 && *blen > strlen(opt)) { + len = snprintf(*buf, *blen, "%s", opt); + if (len != strlen(opt)) + printf("EEK!!\n"); + *buf += len; + *blen -= len; + } +} + +/* + * This function printf out an options integer value. + */ +static __inline void nfscl_printoptval(struct nfsmount *nmp, int optval, + char *opt, char **buf, size_t *blen) +{ + int len; + + if (*blen > strlen(opt) + 1) { + /* Could result in truncated output string. */ + len = snprintf(*buf, *blen, "%s=%d", opt, optval); + if (len < *blen) { + *buf += len; + *blen -= len; + } + } +} + +/* + * Load the option flags and values into the buffer. + */ +void nfscl_retopts(struct nfsmount *nmp, char *buffer, size_t buflen) +{ + char *buf; + size_t blen; + + buf = buffer; + blen = buflen; + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NFSV4) != 0, "nfsv4", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NFSV3) != 0, "nfsv3", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0, + "nfsv2", &buf, &blen); + nfscl_printopt(nmp, nmp->nm_sotype == SOCK_STREAM, ",tcp", &buf, &blen); + nfscl_printopt(nmp, nmp->nm_sotype != SOCK_STREAM, ",udp", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_RESVPORT) != 0, ",resvport", + &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NOCONN) != 0, ",noconn", + &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_SOFT) == 0, ",hard", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_SOFT) != 0, ",soft", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_INT) != 0, ",intr", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NOCTO) == 0, ",cto", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_NOCTO) != 0, ",nocto", &buf, + &blen); + nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NOLOCKD | NFSMNT_NFSV4)) == + 0, ",lockd", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_NOLOCKD | NFSMNT_NFSV4)) == + NFSMNT_NOLOCKD, ",nolockd", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_RDIRPLUS) != 0, ",rdirplus", + &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & NFSMNT_KERB) == 0, ",sec=sys", + &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_KERB | NFSMNT_INTEGRITY | + NFSMNT_PRIVACY)) == NFSMNT_KERB, ",sec=krb5", &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_KERB | NFSMNT_INTEGRITY | + NFSMNT_PRIVACY)) == (NFSMNT_KERB | NFSMNT_INTEGRITY), ",sec=krb5i", + &buf, &blen); + nfscl_printopt(nmp, (nmp->nm_flag & (NFSMNT_KERB | NFSMNT_INTEGRITY | + NFSMNT_PRIVACY)) == (NFSMNT_KERB | NFSMNT_PRIVACY), ",sec=krb5p", + &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_acdirmin, ",acdirmin", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_acdirmax, ",acdirmax", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_acregmin, ",acregmin", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_acregmax, ",acregmax", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_nametimeo, ",nametimeo", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_negnametimeo, ",negnametimeo", &buf, + &blen); + nfscl_printoptval(nmp, nmp->nm_rsize, ",rsize", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_wsize, ",wsize", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_readdirsize, ",readdirsize", &buf, + &blen); + nfscl_printoptval(nmp, nmp->nm_readahead, ",readahead", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_wcommitsize, ",wcommitsize", &buf, + &blen); + nfscl_printoptval(nmp, nmp->nm_timeo, ",timeout", &buf, &blen); + nfscl_printoptval(nmp, nmp->nm_retry, ",retrans", &buf, &blen); +} + Modified: stable/9/sys/nfs/nfs_nfssvc.c ============================================================================== --- stable/9/sys/nfs/nfs_nfssvc.c Sun Dec 16 13:56:38 2012 (r244288) +++ stable/9/sys/nfs/nfs_nfssvc.c Sun Dec 16 14:01:56 2012 (r244289) @@ -91,8 +91,8 @@ sys_nfssvc(struct thread *td, struct nfs if ((uap->flag & (NFSSVC_ADDSOCK | NFSSVC_OLDNFSD | NFSSVC_NFSD)) && nfsd_call_nfsserver != NULL) error = (*nfsd_call_nfsserver)(td, uap); - else if ((uap->flag & (NFSSVC_CBADDSOCK | NFSSVC_NFSCBD)) && - nfsd_call_nfscl != NULL) + else if ((uap->flag & (NFSSVC_CBADDSOCK | NFSSVC_NFSCBD | + NFSSVC_DUMPMNTOPTS)) && nfsd_call_nfscl != NULL) error = (*nfsd_call_nfscl)(td, uap); else if ((uap->flag & (NFSSVC_IDNAME | NFSSVC_GETSTATS | NFSSVC_GSSDADDPORT | NFSSVC_GSSDADDFIRST | NFSSVC_GSSDDELETEALL | Modified: stable/9/sys/nfs/nfssvc.h ============================================================================== --- stable/9/sys/nfs/nfssvc.h Sun Dec 16 13:56:38 2012 (r244288) +++ stable/9/sys/nfs/nfssvc.h Sun Dec 16 14:01:56 2012 (r244289) @@ -68,5 +68,13 @@ #define NFSSVC_ZEROSRVSTATS 0x02000000 /* modifier for GETSTATS */ #define NFSSVC_SUSPENDNFSD 0x04000000 #define NFSSVC_RESUMENFSD 0x08000000 +#define NFSSVC_DUMPMNTOPTS 0x10000000 + +/* Argument structure for NFSSVC_DUMPMNTOPTS. */ +struct nfscl_dumpmntopts { + char *ndmnt_fname; /* File Name */ + size_t ndmnt_blen; /* Size of buffer */ + void *ndmnt_buf; /* and the buffer */ +}; #endif /* _NFS_NFSSVC_H */ From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 14:10:13 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94D9341A; Sun, 16 Dec 2012 14:10:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4228FC0A; Sun, 16 Dec 2012 14:10:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGEAD9X089615; Sun, 16 Dec 2012 14:10:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGEADBP089614; Sun, 16 Dec 2012 14:10:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201212161410.qBGEADBP089614@svn.freebsd.org> From: Rick Macklem Date: Sun, 16 Dec 2012 14:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244291 - stable/9/usr.bin/nfsstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 14:10:13 -0000 Author: rmacklem Date: Sun Dec 16 14:10:12 2012 New Revision: 244291 URL: http://svnweb.freebsd.org/changeset/base/244291 Log: MFC: r243783 Add a "-m" option to nfsstat, which dumps out the actual options used by all NFS mounts. Works for the new/default NFS client only. Modified: stable/9/usr.bin/nfsstat/nfsstat.c Directory Properties: stable/9/usr.bin/nfsstat/ (props changed) Modified: stable/9/usr.bin/nfsstat/nfsstat.c ============================================================================== --- stable/9/usr.bin/nfsstat/nfsstat.c Sun Dec 16 14:09:18 2012 (r244290) +++ stable/9/usr.bin/nfsstat/nfsstat.c Sun Dec 16 14:10:12 2012 (r244291) @@ -107,14 +107,36 @@ main(int argc, char **argv) int ch; char *memf, *nlistf; char errbuf[_POSIX2_LINE_MAX]; + int mntlen, i; + char buf[1024]; + struct statfs *mntbuf; + struct nfscl_dumpmntopts dumpmntopts; interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "cesWM:N:ow:z")) != -1) + while ((ch = getopt(argc, argv, "cesWM:mN:ow:z")) != -1) switch(ch) { case 'M': memf = optarg; break; + case 'm': + /* Display mount options for NFS mount points. */ + mntlen = getmntinfo(&mntbuf, MNT_NOWAIT); + for (i = 0; i < mntlen; i++) { + if (strcmp(mntbuf->f_fstypename, "nfs") == 0) { + dumpmntopts.ndmnt_fname = + mntbuf->f_mntonname; + dumpmntopts.ndmnt_buf = buf; + dumpmntopts.ndmnt_blen = sizeof(buf); + if (nfssvc(NFSSVC_DUMPMNTOPTS, + &dumpmntopts) >= 0) + printf("%s on %s\n%s\n", + mntbuf->f_mntfromname, + mntbuf->f_mntonname, buf); + } + mntbuf++; + } + exit(0); case 'N': nlistf = optarg; break; @@ -646,7 +668,7 @@ void usage(void) { (void)fprintf(stderr, - "usage: nfsstat [-ceoszW] [-M core] [-N system] [-w wait]\n"); + "usage: nfsstat [-cemoszW] [-M core] [-N system] [-w wait]\n"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 14:13:11 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 18C2C5CE; Sun, 16 Dec 2012 14:13:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F0D2B8FC12; Sun, 16 Dec 2012 14:13:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGEDA5l090222; Sun, 16 Dec 2012 14:13:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGEDAXb090221; Sun, 16 Dec 2012 14:13:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201212161413.qBGEDAXb090221@svn.freebsd.org> From: Rick Macklem Date: Sun, 16 Dec 2012 14:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244292 - stable/9/usr.bin/nfsstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 14:13:11 -0000 Author: rmacklem Date: Sun Dec 16 14:13:10 2012 New Revision: 244292 URL: http://svnweb.freebsd.org/changeset/base/244292 Log: MFC: r243784 Document the "-m" option added by r243783. This is a content change. Modified: stable/9/usr.bin/nfsstat/nfsstat.1 Directory Properties: stable/9/usr.bin/nfsstat/ (props changed) Modified: stable/9/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- stable/9/usr.bin/nfsstat/nfsstat.1 Sun Dec 16 14:10:12 2012 (r244291) +++ stable/9/usr.bin/nfsstat/nfsstat.1 Sun Dec 16 14:13:10 2012 (r244292) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 4, 2011 +.Dd November 14, 2012 .Dt NFSSTAT 1 .Os .Sh NAME @@ -38,7 +38,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl ceoszW +.Op Fl cemoszW .Op Fl M Ar core .Op Fl N Ar system .Op Fl w Ar wait @@ -62,6 +62,12 @@ This option is incompatible with Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . +.It Fl m +Report the mount options for all new NFS client mounts. +This option overrides all others and +.Nm +will exit after completing the report. +This option is only supported by the new NFS client. .It Fl N Extract the name list from the specified system instead of the default .Pa /boot/kernel/kernel . From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 16:55:12 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8DC0FCBE; Sun, 16 Dec 2012 16:55:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 58BE58FC0C; Sun, 16 Dec 2012 16:55:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGtCFl014558; Sun, 16 Dec 2012 16:55:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGtCX4014556; Sun, 16 Dec 2012 16:55:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161655.qBGGtCX4014556@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244297 - stable/9/usr.bin/cut X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:55:12 -0000 Author: eadler Date: Sun Dec 16 16:55:11 2012 New Revision: 244297 URL: http://svnweb.freebsd.org/changeset/base/244297 Log: MFC r236866,r236867: - Consistenly mention columns and fields - Add -b to short error messages Approved by: kevlo Approved by: cperciva (implicit) Modified: stable/9/usr.bin/cut/cut.1 stable/9/usr.bin/cut/cut.c Directory Properties: stable/9/usr.bin/cut/ (props changed) Modified: stable/9/usr.bin/cut/cut.1 ============================================================================== --- stable/9/usr.bin/cut/cut.1 Sun Dec 16 14:53:27 2012 (r244296) +++ stable/9/usr.bin/cut/cut.1 Sun Dec 16 16:55:11 2012 (r244297) @@ -68,7 +68,7 @@ The items specified by .Ar list can be in terms of column position or in terms of fields delimited by a special character. -Column numbering starts from 1. +Column and field numbering start from 1. .Pp The .Ar list @@ -78,14 +78,14 @@ number ranges. Number ranges consist of a number, a dash .Pq Sq \- , and a second number -and select the fields or columns from the first number to the second, +and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all -fields or columns from 1 to the last number. +columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all -fields or columns from the last number to the end of the line. +columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. -It is not an error to select fields or columns not present in the +It is not an error to select columns or fields not present in the input line. .Pp The options are as follows: Modified: stable/9/usr.bin/cut/cut.c ============================================================================== --- stable/9/usr.bin/cut/cut.c Sun Dec 16 14:53:27 2012 (r244296) +++ stable/9/usr.bin/cut/cut.c Sun Dec 16 16:55:11 2012 (r244297) @@ -164,7 +164,7 @@ get_list(char *list) * set a byte in the positions array to indicate if a field or * column is to be selected; use +1, it's 1-based, not 0-based. * Numbers and number ranges may be overlapping, repeated, and in - * any order. We handle "-3-5" although there's no real reason too. + * any order. We handle "-3-5" although there's no real reason to. */ for (; (p = strsep(&list, ", \t")) != NULL;) { setautostart = start = stop = 0; @@ -187,9 +187,9 @@ get_list(char *list) } } if (*p) - errx(1, "[-cf] list: illegal list value"); + errx(1, "[-bcf] list: illegal list value"); if (!stop || !start) - errx(1, "[-cf] list: values may not include zero"); + errx(1, "[-bcf] list: values may not include zero"); if (maxval < stop) { maxval = stop; needpos(maxval + 1); From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 16:55:41 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE7BAE29; Sun, 16 Dec 2012 16:55:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8A19E8FC0C; Sun, 16 Dec 2012 16:55:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGtfLX014649; Sun, 16 Dec 2012 16:55:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGtfYU014646; Sun, 16 Dec 2012 16:55:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161655.qBGGtfYU014646@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244298 - stable/8/usr.bin/cut X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:55:41 -0000 Author: eadler Date: Sun Dec 16 16:55:40 2012 New Revision: 244298 URL: http://svnweb.freebsd.org/changeset/base/244298 Log: MFC r236866,r236867: - Consistenly mention columns and fields - Add -b to short error messages Approved by: kevlo Approved by: cperciva (implicit) Modified: stable/8/usr.bin/cut/cut.1 stable/8/usr.bin/cut/cut.c Directory Properties: stable/8/usr.bin/cut/ (props changed) Modified: stable/8/usr.bin/cut/cut.1 ============================================================================== --- stable/8/usr.bin/cut/cut.1 Sun Dec 16 16:55:11 2012 (r244297) +++ stable/8/usr.bin/cut/cut.1 Sun Dec 16 16:55:40 2012 (r244298) @@ -72,7 +72,7 @@ The items specified by .Ar list can be in terms of column position or in terms of fields delimited by a special character. -Column numbering starts from 1. +Column and field numbering start from 1. .Pp The .Ar list @@ -82,14 +82,14 @@ number ranges. Number ranges consist of a number, a dash .Pq Sq \- , and a second number -and select the fields or columns from the first number to the second, +and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all -fields or columns from 1 to the last number. +columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all -fields or columns from the last number to the end of the line. +columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. -It is not an error to select fields or columns not present in the +It is not an error to select columns or fields not present in the input line. .Pp The options are as follows: Modified: stable/8/usr.bin/cut/cut.c ============================================================================== --- stable/8/usr.bin/cut/cut.c Sun Dec 16 16:55:11 2012 (r244297) +++ stable/8/usr.bin/cut/cut.c Sun Dec 16 16:55:40 2012 (r244298) @@ -168,7 +168,7 @@ get_list(char *list) * set a byte in the positions array to indicate if a field or * column is to be selected; use +1, it's 1-based, not 0-based. * Numbers and number ranges may be overlapping, repeated, and in - * any order. We handle "-3-5" although there's no real reason too. + * any order. We handle "-3-5" although there's no real reason to. */ for (; (p = strsep(&list, ", \t")) != NULL;) { setautostart = start = stop = 0; @@ -191,9 +191,9 @@ get_list(char *list) } } if (*p) - errx(1, "[-cf] list: illegal list value"); + errx(1, "[-bcf] list: illegal list value"); if (!stop || !start) - errx(1, "[-cf] list: values may not include zero"); + errx(1, "[-bcf] list: values may not include zero"); if (maxval < stop) { maxval = stop; needpos(maxval + 1); From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 16:56:00 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08DF7F8B; Sun, 16 Dec 2012 16:56:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC7B08FC18; Sun, 16 Dec 2012 16:55:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGtx4g014712; Sun, 16 Dec 2012 16:55:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGtxOk014710; Sun, 16 Dec 2012 16:55:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161655.qBGGtxOk014710@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244299 - stable/7/usr.bin/cut X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:56:00 -0000 Author: eadler Date: Sun Dec 16 16:55:59 2012 New Revision: 244299 URL: http://svnweb.freebsd.org/changeset/base/244299 Log: MFC r236866,r236867: - Consistenly mention columns and fields - Add -b to short error messages Approved by: kevlo Approved by: cperciva (implicit) Modified: stable/7/usr.bin/cut/cut.1 stable/7/usr.bin/cut/cut.c Directory Properties: stable/7/usr.bin/cut/ (props changed) Modified: stable/7/usr.bin/cut/cut.1 ============================================================================== --- stable/7/usr.bin/cut/cut.1 Sun Dec 16 16:55:40 2012 (r244298) +++ stable/7/usr.bin/cut/cut.1 Sun Dec 16 16:55:59 2012 (r244299) @@ -72,7 +72,7 @@ The items specified by .Ar list can be in terms of column position or in terms of fields delimited by a special character. -Column numbering starts from 1. +Column and field numbering start from 1. .Pp The .Ar list @@ -82,14 +82,14 @@ number ranges. Number ranges consist of a number, a dash .Pq Sq \- , and a second number -and select the fields or columns from the first number to the second, +and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all -fields or columns from 1 to the last number. +columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all -fields or columns from the last number to the end of the line. +columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. -It is not an error to select fields or columns not present in the +It is not an error to select columns or fields not present in the input line. .Pp The options are as follows: Modified: stable/7/usr.bin/cut/cut.c ============================================================================== --- stable/7/usr.bin/cut/cut.c Sun Dec 16 16:55:40 2012 (r244298) +++ stable/7/usr.bin/cut/cut.c Sun Dec 16 16:55:59 2012 (r244299) @@ -168,7 +168,7 @@ get_list(char *list) * set a byte in the positions array to indicate if a field or * column is to be selected; use +1, it's 1-based, not 0-based. * Numbers and number ranges may be overlapping, repeated, and in - * any order. We handle "-3-5" although there's no real reason too. + * any order. We handle "-3-5" although there's no real reason to. */ for (; (p = strsep(&list, ", \t")) != NULL;) { setautostart = start = stop = 0; @@ -191,9 +191,9 @@ get_list(char *list) } } if (*p) - errx(1, "[-cf] list: illegal list value"); + errx(1, "[-bcf] list: illegal list value"); if (!stop || !start) - errx(1, "[-cf] list: values may not include zero"); + errx(1, "[-bcf] list: values may not include zero"); if (maxval < stop) { maxval = stop; needpos(maxval + 1); From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 16:59:43 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 627AB2A9; Sun, 16 Dec 2012 16:59:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2BCC38FC0A; Sun, 16 Dec 2012 16:59:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGxhV3015293; Sun, 16 Dec 2012 16:59:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGxhxV015292; Sun, 16 Dec 2012 16:59:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161659.qBGGxhxV015292@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244300 - stable/9/usr.bin/cut X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:59:43 -0000 Author: eadler Date: Sun Dec 16 16:59:42 2012 New Revision: 244300 URL: http://svnweb.freebsd.org/changeset/base/244300 Log: MFC r227162: Add missing static keywords to cut(1) Approved by: ed Approved by: cperciva (implicit) Modified: stable/9/usr.bin/cut/cut.c Directory Properties: stable/9/usr.bin/cut/ (props changed) Modified: stable/9/usr.bin/cut/cut.c ============================================================================== --- stable/9/usr.bin/cut/cut.c Sun Dec 16 16:55:59 2012 (r244299) +++ stable/9/usr.bin/cut/cut.c Sun Dec 16 16:59:42 2012 (r244300) @@ -50,25 +50,25 @@ __FBSDID("$FreeBSD$"); #include #include -int bflag; -int cflag; -wchar_t dchar; -char dcharmb[MB_LEN_MAX + 1]; -int dflag; -int fflag; -int nflag; -int sflag; - -size_t autostart, autostop, maxval; -char * positions; - -int b_cut(FILE *, const char *); -int b_n_cut(FILE *, const char *); -int c_cut(FILE *, const char *); -int f_cut(FILE *, const char *); -void get_list(char *); -void needpos(size_t); -static void usage(void); +static int bflag; +static int cflag; +static wchar_t dchar; +static char dcharmb[MB_LEN_MAX + 1]; +static int dflag; +static int fflag; +static int nflag; +static int sflag; + +static size_t autostart, autostop, maxval; +static char * positions; + +static int b_cut(FILE *, const char *); +static int b_n_cut(FILE *, const char *); +static int c_cut(FILE *, const char *); +static int f_cut(FILE *, const char *); +static void get_list(char *); +static void needpos(size_t); +static void usage(void); int main(int argc, char *argv[]) @@ -153,7 +153,7 @@ main(int argc, char *argv[]) exit(rval); } -void +static void get_list(char *list) { size_t setautostart, start, stop; @@ -208,7 +208,7 @@ get_list(char *list) memset(positions + 1, '1', autostart); } -void +static void needpos(size_t n) { static size_t npos; @@ -227,7 +227,7 @@ needpos(size_t n) } } -int +static int b_cut(FILE *fp, const char *fname __unused) { int ch, col; @@ -261,7 +261,7 @@ b_cut(FILE *fp, const char *fname __unus * Although this function also handles the case where -n is not specified, * b_cut() ought to be much faster. */ -int +static int b_n_cut(FILE *fp, const char *fname) { size_t col, i, lbuflen; @@ -323,7 +323,7 @@ b_n_cut(FILE *fp, const char *fname) return (warned); } -int +static int c_cut(FILE *fp, const char *fname) { wint_t ch; @@ -358,7 +358,7 @@ out: return (0); } -int +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 16:59:45 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7460E2AA; Sun, 16 Dec 2012 16:59:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC208FC12; Sun, 16 Dec 2012 16:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGxjgT015328; Sun, 16 Dec 2012 16:59:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGxjTA015327; Sun, 16 Dec 2012 16:59:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161659.qBGGxjTA015327@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244301 - stable/7/usr.bin/cut X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 16:59:45 -0000 Author: eadler Date: Sun Dec 16 16:59:44 2012 New Revision: 244301 URL: http://svnweb.freebsd.org/changeset/base/244301 Log: MFC r227162: Add missing static keywords to cut(1) Approved by: ed Approved by: cperciva (implicit) Modified: stable/7/usr.bin/cut/cut.c Directory Properties: stable/7/usr.bin/cut/ (props changed) Modified: stable/7/usr.bin/cut/cut.c ============================================================================== --- stable/7/usr.bin/cut/cut.c Sun Dec 16 16:59:42 2012 (r244300) +++ stable/7/usr.bin/cut/cut.c Sun Dec 16 16:59:44 2012 (r244301) @@ -54,25 +54,25 @@ __FBSDID("$FreeBSD$"); #include #include -int bflag; -int cflag; -wchar_t dchar; -char dcharmb[MB_LEN_MAX + 1]; -int dflag; -int fflag; -int nflag; -int sflag; - -size_t autostart, autostop, maxval; -char * positions; - -int b_cut(FILE *, const char *); -int b_n_cut(FILE *, const char *); -int c_cut(FILE *, const char *); -int f_cut(FILE *, const char *); -void get_list(char *); -void needpos(size_t); -static void usage(void); +static int bflag; +static int cflag; +static wchar_t dchar; +static char dcharmb[MB_LEN_MAX + 1]; +static int dflag; +static int fflag; +static int nflag; +static int sflag; + +static size_t autostart, autostop, maxval; +static char * positions; + +static int b_cut(FILE *, const char *); +static int b_n_cut(FILE *, const char *); +static int c_cut(FILE *, const char *); +static int f_cut(FILE *, const char *); +static void get_list(char *); +static void needpos(size_t); +static void usage(void); int main(int argc, char *argv[]) @@ -157,7 +157,7 @@ main(int argc, char *argv[]) exit(rval); } -void +static void get_list(char *list) { size_t setautostart, start, stop; @@ -212,7 +212,7 @@ get_list(char *list) memset(positions + 1, '1', autostart); } -void +static void needpos(size_t n) { static size_t npos; @@ -231,7 +231,7 @@ needpos(size_t n) } } -int +static int b_cut(FILE *fp, const char *fname __unused) { int ch, col; @@ -265,7 +265,7 @@ b_cut(FILE *fp, const char *fname __unus * Although this function also handles the case where -n is not specified, * b_cut() ought to be much faster. */ -int +static int b_n_cut(FILE *fp, const char *fname) { size_t col, i, lbuflen; @@ -327,7 +327,7 @@ b_n_cut(FILE *fp, const char *fname) return (warned); } -int +static int c_cut(FILE *fp, const char *fname) { wint_t ch; @@ -362,7 +362,7 @@ out: return (0); } -int +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 17:00:00 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AEDF4D0; Sun, 16 Dec 2012 17:00:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EA1808FC13; Sun, 16 Dec 2012 16:59:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGGxx8B015402; Sun, 16 Dec 2012 16:59:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGGxx1G015401; Sun, 16 Dec 2012 16:59:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161659.qBGGxx1G015401@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 16:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244302 - stable/8/usr.bin/cut X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:00:00 -0000 Author: eadler Date: Sun Dec 16 16:59:59 2012 New Revision: 244302 URL: http://svnweb.freebsd.org/changeset/base/244302 Log: MFC r227162: Add missing static keywords to cut(1) Approved by: ed Approved by: cperciva (implicit) Modified: stable/8/usr.bin/cut/cut.c Directory Properties: stable/8/usr.bin/cut/ (props changed) Modified: stable/8/usr.bin/cut/cut.c ============================================================================== --- stable/8/usr.bin/cut/cut.c Sun Dec 16 16:59:44 2012 (r244301) +++ stable/8/usr.bin/cut/cut.c Sun Dec 16 16:59:59 2012 (r244302) @@ -54,25 +54,25 @@ __FBSDID("$FreeBSD$"); #include #include -int bflag; -int cflag; -wchar_t dchar; -char dcharmb[MB_LEN_MAX + 1]; -int dflag; -int fflag; -int nflag; -int sflag; - -size_t autostart, autostop, maxval; -char * positions; - -int b_cut(FILE *, const char *); -int b_n_cut(FILE *, const char *); -int c_cut(FILE *, const char *); -int f_cut(FILE *, const char *); -void get_list(char *); -void needpos(size_t); -static void usage(void); +static int bflag; +static int cflag; +static wchar_t dchar; +static char dcharmb[MB_LEN_MAX + 1]; +static int dflag; +static int fflag; +static int nflag; +static int sflag; + +static size_t autostart, autostop, maxval; +static char * positions; + +static int b_cut(FILE *, const char *); +static int b_n_cut(FILE *, const char *); +static int c_cut(FILE *, const char *); +static int f_cut(FILE *, const char *); +static void get_list(char *); +static void needpos(size_t); +static void usage(void); int main(int argc, char *argv[]) @@ -157,7 +157,7 @@ main(int argc, char *argv[]) exit(rval); } -void +static void get_list(char *list) { size_t setautostart, start, stop; @@ -212,7 +212,7 @@ get_list(char *list) memset(positions + 1, '1', autostart); } -void +static void needpos(size_t n) { static size_t npos; @@ -231,7 +231,7 @@ needpos(size_t n) } } -int +static int b_cut(FILE *fp, const char *fname __unused) { int ch, col; @@ -265,7 +265,7 @@ b_cut(FILE *fp, const char *fname __unus * Although this function also handles the case where -n is not specified, * b_cut() ought to be much faster. */ -int +static int b_n_cut(FILE *fp, const char *fname) { size_t col, i, lbuflen; @@ -327,7 +327,7 @@ b_n_cut(FILE *fp, const char *fname) return (warned); } -int +static int c_cut(FILE *fp, const char *fname) { wint_t ch; @@ -362,7 +362,7 @@ out: return (0); } -int +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 17:01:24 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35F4D728; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 110618FC12; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGH1NBx015910; Sun, 16 Dec 2012 17:01:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGH1Nd4015903; Sun, 16 Dec 2012 17:01:23 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161701.qBGH1Nd4015903@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 17:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244303 - stable/9/usr.bin/cut X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:01:24 -0000 Author: eadler Date: Sun Dec 16 17:01:23 2012 New Revision: 244303 URL: http://svnweb.freebsd.org/changeset/base/244303 Log: MFC r243320,r243474: Add 'w' flag to: Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. Approved by: cperciva (implicit) Modified: stable/9/usr.bin/cut/cut.1 stable/9/usr.bin/cut/cut.c Directory Properties: stable/9/usr.bin/cut/ (props changed) Modified: stable/9/usr.bin/cut/cut.1 ============================================================================== --- stable/9/usr.bin/cut/cut.1 Sun Dec 16 16:59:59 2012 (r244302) +++ stable/9/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244303) @@ -31,7 +31,7 @@ .\" @(#)cut.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 21, 2006 +.Dd August 8, 2012 .Dt CUT 1 .Os .Sh NAME @@ -47,7 +47,7 @@ .Op Ar .Nm .Fl f Ar list -.Op Fl d Ar delim +.Op Fl w | Fl d Ar delim .Op Fl s .Op Ar .Sh DESCRIPTION @@ -119,6 +119,9 @@ that form the character are selected. .It Fl s Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. +.It Fl w +Use whitespace (spaces and tabs) as the delimiter. +Consecutive spaces and tabs count as one single field separator. .El .Sh ENVIRONMENT The Modified: stable/9/usr.bin/cut/cut.c ============================================================================== --- stable/9/usr.bin/cut/cut.c Sun Dec 16 16:59:59 2012 (r244302) +++ stable/9/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244303) @@ -58,6 +58,7 @@ static int dflag; static int fflag; static int nflag; static int sflag; +static int wflag; static size_t autostart, autostop, maxval; static char * positions; @@ -67,6 +68,7 @@ static int b_n_cut(FILE *, const char *) static int c_cut(FILE *, const char *); static int f_cut(FILE *, const char *); static void get_list(char *); +static int is_delim(wchar_t); static void needpos(size_t); static void usage(void); @@ -84,7 +86,7 @@ main(int argc, char *argv[]) dchar = '\t'; /* default delimiter is \t */ strcpy(dcharmb, "\t"); - while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != -1) + while ((ch = getopt(argc, argv, "b:c:d:f:snw")) != -1) switch(ch) { case 'b': get_list(optarg); @@ -111,6 +113,9 @@ main(int argc, char *argv[]) case 'n': nflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -119,9 +124,9 @@ main(int argc, char *argv[]) argv += optind; if (fflag) { - if (bflag || cflag || nflag) + if (bflag || cflag || nflag || (wflag && dflag)) usage(); - } else if (!(bflag || cflag) || dflag || sflag) + } else if (!(bflag || cflag) || dflag || sflag || wflag) usage(); else if (!bflag && nflag) usage(); @@ -359,18 +364,30 @@ out: } static int +is_delim(wchar_t ch) +{ + if (wflag) { + if (ch == ' ' || ch == '\t') + return 1; + } else { + if (ch == dchar) + return 1; + } + return 0; +} + +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; int field, i, isdelim; char *pos, *p; - wchar_t sep; int output; char *lbuf, *mlbuf; size_t clen, lbuflen, reallen; mlbuf = NULL; - for (sep = dchar; (lbuf = fgetln(fp, &lbuflen)) != NULL;) { + while ((lbuf = fgetln(fp, &lbuflen)) != NULL) { reallen = lbuflen; /* Assert EOL has a newline. */ if (*(lbuf + lbuflen - 1) != '\n') { @@ -394,7 +411,7 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; /* this should work if newline is delimiter */ - if (ch == sep) + if (is_delim(ch)) isdelim = 1; if (ch == '\n') { if (!isdelim && !sflag) @@ -421,8 +438,13 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; p += clen; - if (ch == '\n' || ch == sep) + if (ch == '\n' || is_delim(ch)) { + /* compress whitespace */ + if (wflag && ch != '\n') + while (is_delim(*p)) + p++; break; + } if (*pos) for (i = 0; i < (int)clen; i++) putchar(p[i - clen]); @@ -452,6 +474,6 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n", "usage: cut -b list [-n] [file ...]", " cut -c list [file ...]", - " cut -f list [-s] [-d delim] [file ...]"); + " cut -f list [-s] [-w | -d delim] [file ...]"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 17:01:24 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7638F72D; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8318FC13; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGH1OmL015917; Sun, 16 Dec 2012 17:01:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGH1OVF015911; Sun, 16 Dec 2012 17:01:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161701.qBGH1OVF015911@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 17:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244304 - stable/7/usr.bin/cut X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:01:24 -0000 Author: eadler Date: Sun Dec 16 17:01:23 2012 New Revision: 244304 URL: http://svnweb.freebsd.org/changeset/base/244304 Log: MFC r243320,r243474: Add 'w' flag to: Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. Approved by: cperciva (implicit) Modified: stable/7/usr.bin/cut/cut.1 stable/7/usr.bin/cut/cut.c Directory Properties: stable/7/usr.bin/cut/ (props changed) Modified: stable/7/usr.bin/cut/cut.1 ============================================================================== --- stable/7/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244303) +++ stable/7/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244304) @@ -35,7 +35,7 @@ .\" @(#)cut.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 21, 2006 +.Dd August 8, 2012 .Dt CUT 1 .Os .Sh NAME @@ -51,7 +51,7 @@ .Op Ar .Nm .Fl f Ar list -.Op Fl d Ar delim +.Op Fl w | Fl d Ar delim .Op Fl s .Op Ar .Sh DESCRIPTION @@ -123,6 +123,9 @@ that form the character are selected. .It Fl s Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. +.It Fl w +Use whitespace (spaces and tabs) as the delimiter. +Consecutive spaces and tabs count as one single field separator. .El .Sh ENVIRONMENT The Modified: stable/7/usr.bin/cut/cut.c ============================================================================== --- stable/7/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244303) +++ stable/7/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244304) @@ -62,6 +62,7 @@ static int dflag; static int fflag; static int nflag; static int sflag; +static int wflag; static size_t autostart, autostop, maxval; static char * positions; @@ -71,6 +72,7 @@ static int b_n_cut(FILE *, const char *) static int c_cut(FILE *, const char *); static int f_cut(FILE *, const char *); static void get_list(char *); +static int is_delim(wchar_t); static void needpos(size_t); static void usage(void); @@ -88,7 +90,7 @@ main(int argc, char *argv[]) dchar = '\t'; /* default delimiter is \t */ strcpy(dcharmb, "\t"); - while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != -1) + while ((ch = getopt(argc, argv, "b:c:d:f:snw")) != -1) switch(ch) { case 'b': get_list(optarg); @@ -115,6 +117,9 @@ main(int argc, char *argv[]) case 'n': nflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -123,9 +128,9 @@ main(int argc, char *argv[]) argv += optind; if (fflag) { - if (bflag || cflag || nflag) + if (bflag || cflag || nflag || (wflag && dflag)) usage(); - } else if (!(bflag || cflag) || dflag || sflag) + } else if (!(bflag || cflag) || dflag || sflag || wflag) usage(); else if (!bflag && nflag) usage(); @@ -363,18 +368,30 @@ out: } static int +is_delim(wchar_t ch) +{ + if (wflag) { + if (ch == ' ' || ch == '\t') + return 1; + } else { + if (ch == dchar) + return 1; + } + return 0; +} + +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; int field, i, isdelim; char *pos, *p; - wchar_t sep; int output; char *lbuf, *mlbuf; size_t clen, lbuflen, reallen; mlbuf = NULL; - for (sep = dchar; (lbuf = fgetln(fp, &lbuflen)) != NULL;) { + while ((lbuf = fgetln(fp, &lbuflen)) != NULL) { reallen = lbuflen; /* Assert EOL has a newline. */ if (*(lbuf + lbuflen - 1) != '\n') { @@ -398,7 +415,7 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; /* this should work if newline is delimiter */ - if (ch == sep) + if (is_delim(ch)) isdelim = 1; if (ch == '\n') { if (!isdelim && !sflag) @@ -425,8 +442,13 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; p += clen; - if (ch == '\n' || ch == sep) + if (ch == '\n' || is_delim(ch)) { + /* compress whitespace */ + if (wflag && ch != '\n') + while (is_delim(*p)) + p++; break; + } if (*pos) for (i = 0; i < (int)clen; i++) putchar(p[i - clen]); @@ -456,6 +478,6 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n", "usage: cut -b list [-n] [file ...]", " cut -c list [file ...]", - " cut -f list [-s] [-d delim] [file ...]"); + " cut -f list [-s] [-w | -d delim] [file ...]"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 17:01:24 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8026D731; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 640E08FC15; Sun, 16 Dec 2012 17:01:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGH1OaJ015918; Sun, 16 Dec 2012 17:01:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGH1OW4015913; Sun, 16 Dec 2012 17:01:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212161701.qBGH1OW4015913@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Dec 2012 17:01:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244305 - stable/8/usr.bin/cut X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 17:01:24 -0000 Author: eadler Date: Sun Dec 16 17:01:23 2012 New Revision: 244305 URL: http://svnweb.freebsd.org/changeset/base/244305 Log: MFC r243320,r243474: Add 'w' flag to: Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. Approved by: cperciva (implicit) Modified: stable/8/usr.bin/cut/cut.1 stable/8/usr.bin/cut/cut.c Directory Properties: stable/8/usr.bin/cut/ (props changed) Modified: stable/8/usr.bin/cut/cut.1 ============================================================================== --- stable/8/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244304) +++ stable/8/usr.bin/cut/cut.1 Sun Dec 16 17:01:23 2012 (r244305) @@ -35,7 +35,7 @@ .\" @(#)cut.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 21, 2006 +.Dd August 8, 2012 .Dt CUT 1 .Os .Sh NAME @@ -51,7 +51,7 @@ .Op Ar .Nm .Fl f Ar list -.Op Fl d Ar delim +.Op Fl w | Fl d Ar delim .Op Fl s .Op Ar .Sh DESCRIPTION @@ -123,6 +123,9 @@ that form the character are selected. .It Fl s Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. +.It Fl w +Use whitespace (spaces and tabs) as the delimiter. +Consecutive spaces and tabs count as one single field separator. .El .Sh ENVIRONMENT The Modified: stable/8/usr.bin/cut/cut.c ============================================================================== --- stable/8/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244304) +++ stable/8/usr.bin/cut/cut.c Sun Dec 16 17:01:23 2012 (r244305) @@ -62,6 +62,7 @@ static int dflag; static int fflag; static int nflag; static int sflag; +static int wflag; static size_t autostart, autostop, maxval; static char * positions; @@ -71,6 +72,7 @@ static int b_n_cut(FILE *, const char *) static int c_cut(FILE *, const char *); static int f_cut(FILE *, const char *); static void get_list(char *); +static int is_delim(wchar_t); static void needpos(size_t); static void usage(void); @@ -88,7 +90,7 @@ main(int argc, char *argv[]) dchar = '\t'; /* default delimiter is \t */ strcpy(dcharmb, "\t"); - while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != -1) + while ((ch = getopt(argc, argv, "b:c:d:f:snw")) != -1) switch(ch) { case 'b': get_list(optarg); @@ -115,6 +117,9 @@ main(int argc, char *argv[]) case 'n': nflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -123,9 +128,9 @@ main(int argc, char *argv[]) argv += optind; if (fflag) { - if (bflag || cflag || nflag) + if (bflag || cflag || nflag || (wflag && dflag)) usage(); - } else if (!(bflag || cflag) || dflag || sflag) + } else if (!(bflag || cflag) || dflag || sflag || wflag) usage(); else if (!bflag && nflag) usage(); @@ -363,18 +368,30 @@ out: } static int +is_delim(wchar_t ch) +{ + if (wflag) { + if (ch == ' ' || ch == '\t') + return 1; + } else { + if (ch == dchar) + return 1; + } + return 0; +} + +static int f_cut(FILE *fp, const char *fname) { wchar_t ch; int field, i, isdelim; char *pos, *p; - wchar_t sep; int output; char *lbuf, *mlbuf; size_t clen, lbuflen, reallen; mlbuf = NULL; - for (sep = dchar; (lbuf = fgetln(fp, &lbuflen)) != NULL;) { + while ((lbuf = fgetln(fp, &lbuflen)) != NULL) { reallen = lbuflen; /* Assert EOL has a newline. */ if (*(lbuf + lbuflen - 1) != '\n') { @@ -398,7 +415,7 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; /* this should work if newline is delimiter */ - if (ch == sep) + if (is_delim(ch)) isdelim = 1; if (ch == '\n') { if (!isdelim && !sflag) @@ -425,8 +442,13 @@ f_cut(FILE *fp, const char *fname) if (clen == 0) clen = 1; p += clen; - if (ch == '\n' || ch == sep) + if (ch == '\n' || is_delim(ch)) { + /* compress whitespace */ + if (wflag && ch != '\n') + while (is_delim(*p)) + p++; break; + } if (*pos) for (i = 0; i < (int)clen; i++) putchar(p[i - clen]); @@ -456,6 +478,6 @@ usage(void) (void)fprintf(stderr, "%s\n%s\n%s\n", "usage: cut -b list [-n] [file ...]", " cut -c list [file ...]", - " cut -f list [-s] [-d delim] [file ...]"); + " cut -f list [-s] [-w | -d delim] [file ...]"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Sun Dec 16 23:41:36 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98C8031B; Sun, 16 Dec 2012 23:41:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 78D758FC13; Sun, 16 Dec 2012 23:41:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBGNfaiF074414; Sun, 16 Dec 2012 23:41:36 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBGNfYem074402; Sun, 16 Dec 2012 23:41:34 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201212162341.qBGNfYem074402@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 16 Dec 2012 23:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244324 - in stable/9/sys: kern security/audit X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 23:41:36 -0000 Author: pjd Date: Sun Dec 16 23:41:34 2012 New Revision: 244324 URL: http://svnweb.freebsd.org/changeset/base/244324 Log: MFC r243719,r243720,r243722,r243723,r243726,r243727,r243746: r243719: IFp4 @208450: Remove redundant call to AUDIT_ARG_UPATH1(). Path will be remembered by the following NDINIT(AUDITVNODE1) call. Sponsored by: The FreeBSD Foundation (auditdistd) r243720: IFp4 @208381: For VOP_GETATTR() we just need vnode to be shared-locked. Sponsored by: The FreeBSD Foundation (auditdistd) r243722: IFp4 @208382: Currently on each record write we call VFS_STATFS() to get available space on the file system as well as VOP_GETATTR() to get trail file size. We can assume that trail file is only updated by the audit worker, so instead of asking for file size on every write, get file size on trail switch only (it should be zero, but it's not expensive) and use global variable audit_size protected by the audit worker lock to keep track of trail file's size. This eliminates VOP_GETATTR() call for every write. VFS_STATFS() is satisfied from in-memory data (mount->mnt_stat), so shouldn't be expensive. Sponsored by: The FreeBSD Foundation (auditdistd) r243723: IFp4 @208383: Currently when we discover that trail file is greater than configured limit we send AUDIT_TRIGGER_ROTATE_KERNEL trigger to the auditd daemon once. If for some reason auditd didn't rotate trail file it will never be rotated. Change it by sending the trigger when trail file size grows by the configured limit. For example if the limit is 1MB, we will send trigger on 1MB, 2MB, 3MB, etc. This is also needed for the auditd change that will be committed soon where auditd may ignore the trigger - it might be ignored if kernel requests the trail file to be rotated too quickly (often than once a second) which would result in overwriting previous trail file. Sponsored by: The FreeBSD Foundation (auditdistd) r243726: IFp4 @208451: Fix path handling for *at() syscalls. Before the change directory descriptor was totally ignored, so the relative path argument was appended to current working directory path and not to the path provided by descriptor, thus wrong paths were stored in audit logs. Now that we use directory descriptor in vfs_lookup, move AUDIT_ARG_UPATH1() and AUDIT_ARG_UPATH2() calls to the place where we hold file descriptors table lock, so we are sure paths will be resolved according to the same directory in audit record and in actual operation. Sponsored by: The FreeBSD Foundation (auditdistd) Reviewed by: rwatson r243727: IFp4 @208452: Audit handling for missing events: - AUE_READLINKAT - AUE_FACCESSAT - AUE_MKDIRAT - AUE_MKFIFOAT - AUE_MKNODAT - AUE_SYMLINKAT Sponsored by: FreeBSD Foundation (auditdistd) r243746: Fix one more compilation issue. Sponsored by: FreeBSD Foundation (auditdistd) Modified: stable/9/sys/kern/vfs_lookup.c stable/9/sys/kern/vfs_mount.c stable/9/sys/security/audit/audit.c stable/9/sys/security/audit/audit.h stable/9/sys/security/audit/audit_arg.c stable/9/sys/security/audit/audit_bsm.c stable/9/sys/security/audit/audit_bsm_klib.c stable/9/sys/security/audit/audit_private.h stable/9/sys/security/audit/audit_worker.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_lookup.c ============================================================================== --- stable/9/sys/kern/vfs_lookup.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/kern/vfs_lookup.c Sun Dec 16 23:41:34 2012 (r244324) @@ -163,17 +163,6 @@ namei(struct nameidata *ndp) error = copyinstr(ndp->ni_dirp, cnp->cn_pnbuf, MAXPATHLEN, (size_t *)&ndp->ni_pathlen); - if (error == 0) { - /* - * If we are auditing the kernel pathname, save the user - * pathname. - */ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1(td, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2(td, cnp->cn_pnbuf); - } - /* * Don't allow empty pathnames. */ @@ -216,6 +205,14 @@ namei(struct nameidata *ndp) ndp->ni_rootdir = fdp->fd_rdir; ndp->ni_topdir = fdp->fd_jdir; + /* + * If we are auditing the kernel pathname, save the user pathname. + */ + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1(td, ndp->ni_dirfd, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2(td, ndp->ni_dirfd, cnp->cn_pnbuf); + dp = NULL; if (cnp->cn_pnbuf[0] != '/') { if (ndp->ni_startdir != NULL) { Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/kern/vfs_mount.c Sun Dec 16 23:41:34 2012 (r244324) @@ -1169,7 +1169,6 @@ sys_unmount(td, uap) } mtx_unlock(&mountlist_mtx); } else { - AUDIT_ARG_UPATH1(td, pathbuf); /* * Try to find global path for path argument. */ Modified: stable/9/sys/security/audit/audit.c ============================================================================== --- stable/9/sys/security/audit/audit.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit.c Sun Dec 16 23:41:34 2012 (r244324) @@ -691,7 +691,7 @@ audit_proc_coredump(struct thread *td, c if (path != NULL) { pathp = &ar->k_ar.ar_arg_upath1; *pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK); - audit_canon_path(td, path, *pathp); + audit_canon_path(td, AT_FDCWD, path, *pathp); ARG_SET_VALID(ar, ARG_UPATH1); } ar->k_ar.ar_arg_signum = td->td_proc->p_sig; Modified: stable/9/sys/security/audit/audit.h ============================================================================== --- stable/9/sys/security/audit/audit.h Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit.h Sun Dec 16 23:41:34 2012 (r244324) @@ -99,8 +99,8 @@ void audit_arg_sockaddr(struct thread * void audit_arg_auid(uid_t auid); void audit_arg_auditinfo(struct auditinfo *au_info); void audit_arg_auditinfo_addr(struct auditinfo_addr *au_info); -void audit_arg_upath1(struct thread *td, char *upath); -void audit_arg_upath2(struct thread *td, char *upath); +void audit_arg_upath1(struct thread *td, int dirfd, char *upath); +void audit_arg_upath2(struct thread *td, int dirfd, char *upath); void audit_arg_vnode1(struct vnode *vp); void audit_arg_vnode2(struct vnode *vp); void audit_arg_text(char *text); @@ -276,14 +276,14 @@ void audit_thread_free(struct thread *t audit_arg_uid((uid)); \ } while (0) -#define AUDIT_ARG_UPATH1(td, upath) do { \ +#define AUDIT_ARG_UPATH1(td, dirfd, upath) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_upath1((td), (upath)); \ + audit_arg_upath1((td), (dirfd), (upath)); \ } while (0) -#define AUDIT_ARG_UPATH2(td, upath) do { \ +#define AUDIT_ARG_UPATH2(td, dirfd, upath) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_upath2((td), (upath)); \ + audit_arg_upath2((td), (dirfd), (upath)); \ } while (0) #define AUDIT_ARG_VALUE(value) do { \ @@ -356,8 +356,8 @@ void audit_thread_free(struct thread *t #define AUDIT_ARG_SUID(suid) #define AUDIT_ARG_TEXT(text) #define AUDIT_ARG_UID(uid) -#define AUDIT_ARG_UPATH1(td, upath) -#define AUDIT_ARG_UPATH2(td, upath) +#define AUDIT_ARG_UPATH1(td, dirfd, upath) +#define AUDIT_ARG_UPATH2(td, dirfd, upath) #define AUDIT_ARG_VALUE(value) #define AUDIT_ARG_VNODE1(vp) #define AUDIT_ARG_VNODE2(vp) Modified: stable/9/sys/security/audit/audit_arg.c ============================================================================== --- stable/9/sys/security/audit/audit_arg.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit_arg.c Sun Dec 16 23:41:34 2012 (r244324) @@ -463,7 +463,8 @@ audit_arg_sockaddr(struct thread *td, st break; case AF_UNIX: - audit_arg_upath1(td, ((struct sockaddr_un *)sa)->sun_path); + audit_arg_upath1(td, AT_FDCWD, + ((struct sockaddr_un *)sa)->sun_path); ARG_SET_VALID(ar, ARG_SADDRUNIX); break; /* XXXAUDIT: default:? */ @@ -710,16 +711,16 @@ audit_arg_file(struct proc *p, struct fi * freed when the audit record is freed. */ static void -audit_arg_upath(struct thread *td, char *upath, char **pathp) +audit_arg_upath(struct thread *td, int dirfd, char *upath, char **pathp) { if (*pathp == NULL) *pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK); - audit_canon_path(td, upath, *pathp); + audit_canon_path(td, dirfd, upath, *pathp); } void -audit_arg_upath1(struct thread *td, char *upath) +audit_arg_upath1(struct thread *td, int dirfd, char *upath) { struct kaudit_record *ar; @@ -727,12 +728,12 @@ audit_arg_upath1(struct thread *td, char if (ar == NULL) return; - audit_arg_upath(td, upath, &ar->k_ar.ar_arg_upath1); + audit_arg_upath(td, dirfd, upath, &ar->k_ar.ar_arg_upath1); ARG_SET_VALID(ar, ARG_UPATH1); } void -audit_arg_upath2(struct thread *td, char *upath) +audit_arg_upath2(struct thread *td, int dirfd, char *upath) { struct kaudit_record *ar; @@ -740,7 +741,7 @@ audit_arg_upath2(struct thread *td, char if (ar == NULL) return; - audit_arg_upath(td, upath, &ar->k_ar.ar_arg_upath2); + audit_arg_upath(td, dirfd, upath, &ar->k_ar.ar_arg_upath2); ARG_SET_VALID(ar, ARG_UPATH2); } Modified: stable/9/sys/security/audit/audit_bsm.c ============================================================================== --- stable/9/sys/security/audit/audit_bsm.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit_bsm.c Sun Dec 16 23:41:34 2012 (r244324) @@ -724,13 +724,6 @@ kaudit_to_bsm(struct kaudit_record *kar, */ break; - case AUE_MKFIFO: - if (ARG_IS_VALID(kar, ARG_MODE)) { - tok = au_to_arg32(2, "mode", ar->ar_arg_mode); - kau_write(rec, tok); - } - /* FALLTHROUGH */ - case AUE_CHDIR: case AUE_CHROOT: case AUE_FSTATAT: @@ -743,6 +736,7 @@ kaudit_to_bsm(struct kaudit_record *kar, case AUE_LPATHCONF: case AUE_PATHCONF: case AUE_READLINK: + case AUE_READLINKAT: case AUE_REVOKE: case AUE_RMDIR: case AUE_SEARCHFS: @@ -762,6 +756,8 @@ kaudit_to_bsm(struct kaudit_record *kar, case AUE_ACCESS: case AUE_EACCESS: + case AUE_FACCESSAT: + ATFD1_TOKENS(1); UPATH1_VNODE1_TOKENS; if (ARG_IS_VALID(kar, ARG_VALUE)) { tok = au_to_arg32(2, "mode", ar->ar_arg_value); @@ -1059,6 +1055,10 @@ kaudit_to_bsm(struct kaudit_record *kar, break; case AUE_MKDIR: + case AUE_MKDIRAT: + case AUE_MKFIFO: + case AUE_MKFIFOAT: + ATFD1_TOKENS(1); if (ARG_IS_VALID(kar, ARG_MODE)) { tok = au_to_arg32(2, "mode", ar->ar_arg_mode); kau_write(rec, tok); @@ -1067,6 +1067,8 @@ kaudit_to_bsm(struct kaudit_record *kar, break; case AUE_MKNOD: + case AUE_MKNODAT: + ATFD1_TOKENS(1); if (ARG_IS_VALID(kar, ARG_MODE)) { tok = au_to_arg32(2, "mode", ar->ar_arg_mode); kau_write(rec, tok); @@ -1546,10 +1548,12 @@ kaudit_to_bsm(struct kaudit_record *kar, break; case AUE_SYMLINK: + case AUE_SYMLINKAT: if (ARG_IS_VALID(kar, ARG_TEXT)) { tok = au_to_text(ar->ar_arg_text); kau_write(rec, tok); } + ATFD1_TOKENS(1); UPATH1_VNODE1_TOKENS; break; Modified: stable/9/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/9/sys/security/audit/audit_bsm_klib.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit_bsm_klib.c Sun Dec 16 23:41:34 2012 (r244324) @@ -462,13 +462,13 @@ auditon_command_event(int cmd) * leave the filename starting with '/' in the audit log in this case. */ void -audit_canon_path(struct thread *td, char *path, char *cpath) +audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath) { struct vnode *cvnp, *rvnp; char *rbuf, *fbuf, *copy; struct filedesc *fdp; struct sbuf sbf; - int error, cwir; + int error, needslash, vfslocked; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d", __func__, __FILE__, __LINE__); @@ -491,10 +491,27 @@ audit_canon_path(struct thread *td, char * path. */ if (*path != '/') { - cvnp = fdp->fd_cdir; - vhold(cvnp); + if (dirfd == AT_FDCWD) { + cvnp = fdp->fd_cdir; + vhold(cvnp); + } else { + /* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */ + error = fgetvp(td, dirfd, 0, &cvnp); + if (error) { + cpath[0] = '\0'; + if (rvnp != NULL) + vdrop(rvnp); + return; + } + vhold(cvnp); + vfslocked = VFS_LOCK_GIANT(cvnp->v_mount); + vrele(cvnp); + VFS_UNLOCK_GIANT(vfslocked); + } + needslash = (fdp->fd_rdir != cvnp); + } else { + needslash = 1; } - cwir = (fdp->fd_rdir == fdp->fd_cdir); FILEDESC_SUNLOCK(fdp); /* * NB: We require that the supplied array be at least MAXPATHLEN bytes @@ -536,7 +553,7 @@ audit_canon_path(struct thread *td, char (void) sbuf_cat(&sbf, rbuf); free(fbuf, M_TEMP); } - if (cwir == 0 || (cwir != 0 && cvnp == NULL)) + if (needslash) (void) sbuf_putc(&sbf, '/'); /* * Now that we have processed any alternate root and relative path Modified: stable/9/sys/security/audit/audit_private.h ============================================================================== --- stable/9/sys/security/audit/audit_private.h Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit_private.h Sun Dec 16 23:41:34 2012 (r244324) @@ -388,7 +388,8 @@ au_event_t audit_flags_and_error_to_ope au_event_t audit_flags_and_error_to_openatevent(int oflags, int error); au_event_t audit_msgctl_to_event(int cmd); au_event_t audit_semctl_to_event(int cmr); -void audit_canon_path(struct thread *td, char *path, char *cpath); +void audit_canon_path(struct thread *td, int dirfd, char *path, + char *cpath); au_event_t auditon_command_event(int cmd); /* Modified: stable/9/sys/security/audit/audit_worker.c ============================================================================== --- stable/9/sys/security/audit/audit_worker.c Sun Dec 16 23:29:56 2012 (r244323) +++ stable/9/sys/security/audit/audit_worker.c Sun Dec 16 23:41:34 2012 (r244324) @@ -88,6 +88,7 @@ static struct proc *audit_thread; static int audit_file_rotate_wait; static struct ucred *audit_cred; static struct vnode *audit_vp; +static off_t audit_size; static struct sx audit_worker_lock; #define AUDIT_WORKER_LOCK_INIT() sx_init(&audit_worker_lock, \ @@ -115,7 +116,6 @@ audit_record_write(struct vnode *vp, str struct statfs *mnt_stat; int error, vfslocked; static int cur_fail; - struct vattr vattr; long temp; AUDIT_WORKER_LOCK_ASSERT(); @@ -134,12 +134,6 @@ audit_record_write(struct vnode *vp, str error = VFS_STATFS(vp->v_mount, mnt_stat); if (error) goto fail; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_GETATTR(vp, &vattr, cred); - VOP_UNLOCK(vp, 0); - if (error) - goto fail; - audit_fstat.af_currsz = vattr.va_size; /* * We handle four different space-related limits: @@ -196,11 +190,11 @@ audit_record_write(struct vnode *vp, str * to the daemon. This is only approximate, which is fine as more * records may be generated before the daemon rotates the file. */ - if ((audit_fstat.af_filesz != 0) && (audit_file_rotate_wait == 0) && - (vattr.va_size >= audit_fstat.af_filesz)) { + if (audit_fstat.af_filesz != 0 && + audit_size >= audit_fstat.af_filesz * (audit_file_rotate_wait + 1)) { AUDIT_WORKER_LOCK_ASSERT(); - audit_file_rotate_wait = 1; + audit_file_rotate_wait++; (void)audit_send_trigger(AUDIT_TRIGGER_ROTATE_KERNEL); } @@ -239,6 +233,8 @@ audit_record_write(struct vnode *vp, str goto fail_enospc; else if (error) goto fail; + AUDIT_WORKER_LOCK_ASSERT(); + audit_size += len; /* * Catch completion of a queue drain here; if we're draining and the @@ -452,10 +448,20 @@ audit_rotate_vnode(struct ucred *cred, s struct ucred *old_audit_cred; struct vnode *old_audit_vp; int vfslocked; + struct vattr vattr; KASSERT((cred != NULL && vp != NULL) || (cred == NULL && vp == NULL), ("audit_rotate_vnode: cred %p vp %p", cred, vp)); + if (vp != NULL) { + vn_lock(vp, LK_SHARED | LK_RETRY); + if (VOP_GETATTR(vp, &vattr, cred) != 0) + vattr.va_size = 0; + VOP_UNLOCK(vp, 0); + } else { + vattr.va_size = 0; + } + /* * Rotate the vnode/cred, and clear the rotate flag so that we will * send a rotate trigger if the new file fills. @@ -465,6 +471,7 @@ audit_rotate_vnode(struct ucred *cred, s old_audit_vp = audit_vp; audit_cred = cred; audit_vp = vp; + audit_size = vattr.va_size; audit_file_rotate_wait = 0; audit_enabled = (audit_vp != NULL); AUDIT_WORKER_UNLOCK(); From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 05:13:16 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DFBEC2A; Mon, 17 Dec 2012 05:13:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 805EF8FC14; Mon, 17 Dec 2012 05:13:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH5DG90022367; Mon, 17 Dec 2012 05:13:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH5DGiw022365; Mon, 17 Dec 2012 05:13:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212170513.qBH5DGiw022365@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 Dec 2012 05:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244337 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 05:13:16 -0000 Author: kib Date: Mon Dec 17 05:13:15 2012 New Revision: 244337 URL: http://svnweb.freebsd.org/changeset/base/244337 Log: MFC r243836: Print the frame addresses for the backtraces on i386 and amd64. Modified: stable/9/sys/amd64/amd64/db_trace.c stable/9/sys/i386/i386/db_trace.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/9/sys/amd64/amd64/db_trace.c Mon Dec 17 01:10:06 2012 (r244336) +++ stable/9/sys/amd64/amd64/db_trace.c Mon Dec 17 05:13:15 2012 (r244337) @@ -186,7 +186,8 @@ db_ss(struct db_variable *vp, db_expr_t static void db_nextframe(struct amd64_frame **, db_addr_t *, struct thread *); static int db_numargs(struct amd64_frame *); -static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t); +static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t, + void *); static void decode_syscall(int, struct thread *); static const char * watchtype_str(int type); @@ -230,12 +231,13 @@ db_numargs(fp) } static void -db_print_stack_entry(name, narg, argnp, argp, callpc) +db_print_stack_entry(name, narg, argnp, argp, callpc, frame) const char *name; int narg; char **argnp; long *argp; db_addr_t callpc; + void *frame; { db_printf("%s(", name); #if 0 @@ -250,6 +252,8 @@ db_print_stack_entry(name, narg, argnp, #endif db_printf(") at "); db_printsym(callpc, DB_STGY_PROC); + if (frame != NULL) + db_printf("/frame 0x%lx", (register_t)frame); db_printf("\n"); } @@ -341,7 +345,7 @@ db_nextframe(struct amd64_frame **fp, db return; } - db_print_stack_entry(name, 0, 0, 0, rip); + db_print_stack_entry(name, 0, 0, 0, rip, &(*fp)->f_frame); /* * Point to base of trapframe which is just above the @@ -437,7 +441,8 @@ db_backtrace(struct thread *td, struct t * Don't try to walk back on a stack for a * process that hasn't actually been run yet. */ - db_print_stack_entry(name, 0, 0, 0, pc); + db_print_stack_entry(name, 0, 0, 0, pc, + actframe); break; } first = FALSE; @@ -451,7 +456,7 @@ db_backtrace(struct thread *td, struct t narg = db_numargs(frame); } - db_print_stack_entry(name, narg, argnp, argp, pc); + db_print_stack_entry(name, narg, argnp, argp, pc, actframe); if (actframe != frame) { /* `frame' belongs to caller. */ @@ -465,7 +470,7 @@ db_backtrace(struct thread *td, struct t if (INKERNEL((long)pc) && !INKERNEL((long)frame)) { sym = db_search_symbol(pc, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); - db_print_stack_entry(name, 0, 0, 0, pc); + db_print_stack_entry(name, 0, 0, 0, pc, frame); break; } if (!INKERNEL((long) frame)) { Modified: stable/9/sys/i386/i386/db_trace.c ============================================================================== --- stable/9/sys/i386/i386/db_trace.c Mon Dec 17 01:10:06 2012 (r244336) +++ stable/9/sys/i386/i386/db_trace.c Mon Dec 17 05:13:15 2012 (r244337) @@ -176,7 +176,8 @@ db_ss(struct db_variable *vp, db_expr_t static void db_nextframe(struct i386_frame **, db_addr_t *, struct thread *); static int db_numargs(struct i386_frame *); -static void db_print_stack_entry(const char *, int, char **, int *, db_addr_t); +static void db_print_stack_entry(const char *, int, char **, int *, db_addr_t, + void *); static void decode_syscall(int, struct thread *); static const char * watchtype_str(int type); @@ -220,12 +221,13 @@ retry: } static void -db_print_stack_entry(name, narg, argnp, argp, callpc) +db_print_stack_entry(name, narg, argnp, argp, callpc, frame) const char *name; int narg; char **argnp; int *argp; db_addr_t callpc; + void *frame; { int n = narg >= 0 ? narg : 5; @@ -242,6 +244,8 @@ db_print_stack_entry(name, narg, argnp, db_printf(",..."); db_printf(") at "); db_printsym(callpc, DB_STGY_PROC); + if (frame != NULL) + db_printf("/frame 0x%r", (register_t)frame); db_printf("\n"); } @@ -326,7 +330,7 @@ db_nextframe(struct i386_frame **fp, db_ return; } - db_print_stack_entry(name, 0, 0, 0, eip); + db_print_stack_entry(name, 0, 0, 0, eip, &(*fp)->f_frame); /* * For a double fault, we have to snag the values from the @@ -467,7 +471,8 @@ db_backtrace(struct thread *td, struct t * Don't try to walk back on a stack for a * process that hasn't actually been run yet. */ - db_print_stack_entry(name, 0, 0, 0, pc); + db_print_stack_entry(name, 0, 0, 0, pc, + actframe); break; } first = FALSE; @@ -481,7 +486,7 @@ db_backtrace(struct thread *td, struct t narg = db_numargs(frame); } - db_print_stack_entry(name, narg, argnp, argp, pc); + db_print_stack_entry(name, narg, argnp, argp, pc, actframe); if (actframe != frame) { /* `frame' belongs to caller. */ @@ -495,7 +500,7 @@ db_backtrace(struct thread *td, struct t if (INKERNEL((int)pc) && !INKERNEL((int) frame)) { sym = db_search_symbol(pc, DB_STGY_ANY, &offset); db_symbol_values(sym, &name, NULL); - db_print_stack_entry(name, 0, 0, 0, pc); + db_print_stack_entry(name, 0, 0, 0, pc, frame); break; } if (!INKERNEL((int) frame)) { From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 05:15:51 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6712DAA; Mon, 17 Dec 2012 05:15:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 90FFE8FC12; Mon, 17 Dec 2012 05:15:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH5Fp1l022714; Mon, 17 Dec 2012 05:15:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH5Fp3o022713; Mon, 17 Dec 2012 05:15:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212170515.qBH5Fp3o022713@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 Dec 2012 05:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244338 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 05:15:51 -0000 Author: kib Date: Mon Dec 17 05:15:51 2012 New Revision: 244338 URL: http://svnweb.freebsd.org/changeset/base/244338 Log: MFC r244076: Do not ignore zero address, possibly returned by the vm_map_find() call. Modified: stable/9/sys/kern/vfs_bio.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Mon Dec 17 05:13:15 2012 (r244337) +++ stable/9/sys/kern/vfs_bio.c Mon Dec 17 05:15:51 2012 (r244338) @@ -2139,15 +2139,16 @@ restart: if (maxsize != bp->b_kvasize) { vm_offset_t addr = 0; + int rv; bfreekva(bp); vm_map_lock(buffer_map); if (vm_map_findspace(buffer_map, - vm_map_min(buffer_map), maxsize, &addr)) { + vm_map_min(buffer_map), maxsize, &addr)) { /* - * Uh oh. Buffer map is to fragmented. We - * must defragment the map. + * Buffer map is too fragmented. + * We must defragment the map. */ atomic_add_int(&bufdefragcnt, 1); vm_map_unlock(buffer_map); @@ -2156,22 +2157,21 @@ restart: brelse(bp); goto restart; } - if (addr) { - vm_map_insert(buffer_map, NULL, 0, - addr, addr + maxsize, - VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT); - - bp->b_kvabase = (caddr_t) addr; - bp->b_kvasize = maxsize; - atomic_add_long(&bufspace, bp->b_kvasize); - atomic_add_int(&bufreusecnt, 1); - } + rv = vm_map_insert(buffer_map, NULL, 0, addr, + addr + maxsize, VM_PROT_ALL, VM_PROT_ALL, + MAP_NOFAULT); + KASSERT(rv == KERN_SUCCESS, + ("vm_map_insert(buffer_map) rv %d", rv)); vm_map_unlock(buffer_map); + bp->b_kvabase = (caddr_t)addr; + bp->b_kvasize = maxsize; + atomic_add_long(&bufspace, bp->b_kvasize); + atomic_add_int(&bufreusecnt, 1); } bp->b_saveaddr = bp->b_kvabase; bp->b_data = bp->b_saveaddr; } - return(bp); + return (bp); } /* From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 05:18:17 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11C9BF3A; Mon, 17 Dec 2012 05:18:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CFD698FC13; Mon, 17 Dec 2012 05:18:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH5IGLH023025; Mon, 17 Dec 2012 05:18:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH5IGC5023024; Mon, 17 Dec 2012 05:18:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212170518.qBH5IGC5023024@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 17 Dec 2012 05:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244339 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 05:18:17 -0000 Author: kib Date: Mon Dec 17 05:18:16 2012 New Revision: 244339 URL: http://svnweb.freebsd.org/changeset/base/244339 Log: MFC r244077: Add amd64-specific ddb command "show pte". The command displays the hierarchy of the page table entries which map the specified address. Modified: stable/9/sys/amd64/amd64/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Dec 17 05:15:51 2012 (r244338) +++ stable/9/sys/amd64/amd64/pmap.c Mon Dec 17 05:18:16 2012 (r244339) @@ -5462,3 +5462,46 @@ pmap_align_superpage(vm_object_t object, else *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset; } + +#include "opt_ddb.h" +#ifdef DDB +#include + +DB_SHOW_COMMAND(pte, pmap_print_pte) +{ + pmap_t pmap; + pml4_entry_t *pml4; + pdp_entry_t *pdp; + pd_entry_t *pde; + pt_entry_t *pte; + vm_offset_t va; + + if (have_addr) { + va = (vm_offset_t)addr; + pmap = PCPU_GET(curpmap); /* XXX */ + } else { + db_printf("show pte addr\n"); + return; + } + pml4 = pmap_pml4e(pmap, va); + db_printf("VA %#016lx pml4e %#016lx", va, *pml4); + if ((*pml4 & PG_V) == 0) { + db_printf("\n"); + return; + } + pdp = pmap_pml4e_to_pdpe(pml4, va); + db_printf(" pdpe %#016lx", *pdp); + if ((*pdp & PG_V) == 0 || (*pdp & PG_PS) != 0) { + db_printf("\n"); + return; + } + pde = pmap_pdpe_to_pde(pdp, va); + db_printf(" pde %#016lx", *pde); + if ((*pde & PG_V) == 0 || (*pde & PG_PS) != 0) { + db_printf("\n"); + return; + } + pte = pmap_pde_to_pte(pde, va); + db_printf(" pte %#016lx\n", *pte); +} +#endif From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 05:31:43 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF973335; Mon, 17 Dec 2012 05:31:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D29188FC0A; Mon, 17 Dec 2012 05:31:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH5Vgk2025076; Mon, 17 Dec 2012 05:31:42 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH5Vg31025075; Mon, 17 Dec 2012 05:31:42 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212170531.qBH5Vg31025075@svn.freebsd.org> From: Eitan Adler Date: Mon, 17 Dec 2012 05:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244340 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 05:31:43 -0000 Author: eadler Date: Mon Dec 17 05:31:42 2012 New Revision: 244340 URL: http://svnweb.freebsd.org/changeset/base/244340 Log: MFC r241836: Remove {harp,hfa,idt} man pages as they were removed in r179308. PR: docs/171234 Approved by: cperciva (implicit) Deleted: stable/9/share/man/man4/harp.4 stable/9/share/man/man4/hfa.4 stable/9/share/man/man4/idt.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Dec 17 05:18:16 2012 (r244339) +++ stable/9/share/man/man4/Makefile Mon Dec 17 05:31:42 2012 (r244340) @@ -148,9 +148,7 @@ MAN= aac.4 \ gpib.4 \ gre.4 \ h_ertt.4 \ - harp.4 \ hatm.4 \ - hfa.4 \ hifn.4 \ hme.4 \ hpet.4 \ @@ -164,7 +162,6 @@ MAN= aac.4 \ icmp.4 \ icmp6.4 \ ida.4 \ - idt.4 \ ifmib.4 \ igb.4 \ igmp.4 \ From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 06:35:16 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 429B146A; Mon, 17 Dec 2012 06:35:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CE9A8FC14; Mon, 17 Dec 2012 06:35:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH6ZFNK033969; Mon, 17 Dec 2012 06:35:15 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH6ZF8f033967; Mon, 17 Dec 2012 06:35:15 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212170635.qBH6ZF8f033967@svn.freebsd.org> From: Xin LI Date: Mon, 17 Dec 2012 06:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244342 - stable/9/usr.bin/less X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 06:35:16 -0000 Author: delphij Date: Mon Dec 17 06:35:15 2012 New Revision: 244342 URL: http://svnweb.freebsd.org/changeset/base/244342 Log: Note that the manual page of less(1) says: Note that a preprocessor cannot output an empty file, since that is interpreted as meaning there is no replacement, and the origi- nal file is used. To avoid this, if LESSOPEN starts with two ver- tical bars, the exit status of the script becomes meaningful. If the exit status is zero, the output is considered to be replace- ment text, even if it empty. If the exit status is nonzero, any output is ignored and the original file is used. For compatibil- ity with previous versions of less, if LESSOPEN starts with only one vertical bar, the exit status of the preprocessor is ignored. Use two pipe symbols for zless, so that zless'ing a compressed empty file will give output rather than being interpreted as its compressed form, which is typically a binary. Thanks Mark Nudelman for pointing out this difference and the suggested solution. Reported by: Matthias Meyser PR: bin/168839 Modified: stable/9/usr.bin/less/zless.sh Directory Properties: stable/9/usr.bin/less/ (props changed) Modified: stable/9/usr.bin/less/zless.sh ============================================================================== --- stable/9/usr.bin/less/zless.sh Mon Dec 17 06:01:57 2012 (r244341) +++ stable/9/usr.bin/less/zless.sh Mon Dec 17 06:35:15 2012 (r244342) @@ -3,5 +3,5 @@ # $FreeBSD$ # -export LESSOPEN="|/usr/bin/lesspipe.sh %s" +export LESSOPEN="||/usr/bin/lesspipe.sh %s" exec /usr/bin/less "$@" From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 06:38:22 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC6BF5FB; Mon, 17 Dec 2012 06:38:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A8EA88FC15; Mon, 17 Dec 2012 06:38:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH6cMNx034372; Mon, 17 Dec 2012 06:38:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH6cMqT034371; Mon, 17 Dec 2012 06:38:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212170638.qBH6cMqT034371@svn.freebsd.org> From: Xin LI Date: Mon, 17 Dec 2012 06:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244343 - stable/8/usr.bin/less X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 06:38:23 -0000 Author: delphij Date: Mon Dec 17 06:38:22 2012 New Revision: 244343 URL: http://svnweb.freebsd.org/changeset/base/244343 Log: MFC r243834: Note that the manual page of less(1) says: Note that a preprocessor cannot output an empty file, since that is interpreted as meaning there is no replacement, and the origi- nal file is used. To avoid this, if LESSOPEN starts with two ver- tical bars, the exit status of the script becomes meaningful. If the exit status is zero, the output is considered to be replace- ment text, even if it empty. If the exit status is nonzero, any output is ignored and the original file is used. For compatibil- ity with previous versions of less, if LESSOPEN starts with only one vertical bar, the exit status of the preprocessor is ignored. Use two pipe symbols for zless, so that zless'ing a compressed empty file will give output rather than being interpreted as its compressed form, which is typically a binary. Thanks Mark Nudelman for pointing out this difference and the suggested solution. Reported by: Matthias Meyser PR: bin/168839 Modified: stable/8/usr.bin/less/zless.sh Directory Properties: stable/8/usr.bin/less/ (props changed) Modified: stable/8/usr.bin/less/zless.sh ============================================================================== --- stable/8/usr.bin/less/zless.sh Mon Dec 17 06:35:15 2012 (r244342) +++ stable/8/usr.bin/less/zless.sh Mon Dec 17 06:38:22 2012 (r244343) @@ -3,5 +3,5 @@ # $FreeBSD$ # -export LESSOPEN="|/usr/bin/lesspipe.sh %s" +export LESSOPEN="||/usr/bin/lesspipe.sh %s" exec /usr/bin/less "$@" From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 06:43:09 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3062B7DE; Mon, 17 Dec 2012 06:43:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 046C98FC0A; Mon, 17 Dec 2012 06:43:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH6h8Rg035088; Mon, 17 Dec 2012 06:43:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH6h8iq035087; Mon, 17 Dec 2012 06:43:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212170643.qBH6h8iq035087@svn.freebsd.org> From: Xin LI Date: Mon, 17 Dec 2012 06:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244344 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 06:43:09 -0000 Author: delphij Date: Mon Dec 17 06:43:08 2012 New Revision: 244344 URL: http://svnweb.freebsd.org/changeset/base/244344 Log: MFC r243807: Use SA_ZPL_CRTIME instead of SA_ZPL_CTIME for creation time. Submitted by: phil.stone at gmx.com Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Dec 17 06:38:22 2012 (r244343) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Dec 17 06:43:08 2012 (r244344) @@ -2682,7 +2682,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, &mtime, 16); SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &ctime, 16); - SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &crtime, 16); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CRTIME(zfsvfs), NULL, &crtime, 16); if (vp->v_type == VBLK || vp->v_type == VCHR) SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_RDEV(zfsvfs), NULL, &rdev, 8); From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 06:44:16 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B701B95C; Mon, 17 Dec 2012 06:44:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9A2AF8FC19; Mon, 17 Dec 2012 06:44:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBH6iGDV035301; Mon, 17 Dec 2012 06:44:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBH6iGME035300; Mon, 17 Dec 2012 06:44:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212170644.qBH6iGME035300@svn.freebsd.org> From: Xin LI Date: Mon, 17 Dec 2012 06:44:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244345 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 06:44:16 -0000 Author: delphij Date: Mon Dec 17 06:44:16 2012 New Revision: 244345 URL: http://svnweb.freebsd.org/changeset/base/244345 Log: MFC r243807: Use SA_ZPL_CRTIME instead of SA_ZPL_CTIME for creation time. Submitted by: phil.stone at gmx.com Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Dec 17 06:43:08 2012 (r244344) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Dec 17 06:44:16 2012 (r244345) @@ -2683,7 +2683,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MTIME(zfsvfs), NULL, &mtime, 16); SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &ctime, 16); - SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), NULL, &crtime, 16); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CRTIME(zfsvfs), NULL, &crtime, 16); if (vp->v_type == VBLK || vp->v_type == VCHR) SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_RDEV(zfsvfs), NULL, &rdev, 8); From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 12:26:11 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 746C0DED; Mon, 17 Dec 2012 12:26:11 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 553CE8FC0C; Mon, 17 Dec 2012 12:26:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHCQB4D085894; Mon, 17 Dec 2012 12:26:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBHCQBTU085893; Mon, 17 Dec 2012 12:26:11 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201212171226.qBHCQBTU085893@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 17 Dec 2012 12:26:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244356 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 12:26:11 -0000 Author: jilles Date: Mon Dec 17 12:26:10 2012 New Revision: 244356 URL: http://svnweb.freebsd.org/changeset/base/244356 Log: MFC r239150: nftw(): Do not check the maxfds argument against OPEN_MAX. Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX does not require us to check this. PR: 95239 Submitted by: Todd Miller Modified: stable/9/lib/libc/gen/nftw.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/nftw.c ============================================================================== --- stable/9/lib/libc/gen/nftw.c Mon Dec 17 11:12:09 2012 (r244355) +++ stable/9/lib/libc/gen/nftw.c Mon Dec 17 12:26:10 2012 (r244356) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, @@ -47,7 +46,7 @@ nftw(const char *path, int (*fn)(const c int error = 0, ftsflags, fnflag, postorder, sverrno; /* XXX - nfds is currently unused */ - if (nfds < 1 || nfds > OPEN_MAX) { + if (nfds < 1) { errno = EINVAL; return (-1); } From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 12:55:02 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1786A40; Mon, 17 Dec 2012 12:55:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D5CF98FC13; Mon, 17 Dec 2012 12:55:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHCt11i089496; Mon, 17 Dec 2012 12:55:01 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBHCt1Vp089495; Mon, 17 Dec 2012 12:55:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212171255.qBHCt1Vp089495@svn.freebsd.org> From: Eitan Adler Date: Mon, 17 Dec 2012 12:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244357 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 12:55:02 -0000 Author: eadler Date: Mon Dec 17 12:55:01 2012 New Revision: 244357 URL: http://svnweb.freebsd.org/changeset/base/244357 Log: MFC r241864: Remove MLINK for if_idt. Approved by: cperciva (implicit) Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Mon Dec 17 12:26:10 2012 (r244356) +++ stable/9/share/man/man4/Makefile Mon Dec 17 12:55:01 2012 (r244357) @@ -592,7 +592,6 @@ MLINKS+=hme.4 if_hme.4 MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} -MLINKS+=idt.4 if_idt.4 MLINKS+=igb.4 if_igb.4 MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ From owner-svn-src-stable@FreeBSD.ORG Mon Dec 17 13:03:14 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03542FD; Mon, 17 Dec 2012 13:03:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DA3D48FC15; Mon, 17 Dec 2012 13:03:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHD3DBw090772; Mon, 17 Dec 2012 13:03:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBHD3D0X090771; Mon, 17 Dec 2012 13:03:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201212171303.qBHD3D0X090771@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 17 Dec 2012 13:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244359 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 13:03:14 -0000 Author: jilles Date: Mon Dec 17 13:03:13 2012 New Revision: 244359 URL: http://svnweb.freebsd.org/changeset/base/244359 Log: MFC r239151: ftw(): Do not check the maxfds argument against OPEN_MAX. Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX does not require us to check this. POSIX does have a requirement on the application that maxfds not exceed {OPEN_MAX}, but does not require the implementation to check it ("may fail"). PR: 95239 Modified: stable/9/lib/libc/gen/ftw.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/ftw.c ============================================================================== --- stable/9/lib/libc/gen/ftw.c Mon Dec 17 12:57:36 2012 (r244358) +++ stable/9/lib/libc/gen/ftw.c Mon Dec 17 13:03:13 2012 (r244359) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), @@ -40,7 +39,7 @@ ftw(const char *path, int (*fn)(const ch int error = 0, fnflag, sverrno; /* XXX - nfds is currently unused */ - if (nfds < 1 || nfds > OPEN_MAX) { + if (nfds < 1) { errno = EINVAL; return (-1); } From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 04:18:43 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A91D16D; Tue, 18 Dec 2012 04:18:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 142DB8FC0C; Tue, 18 Dec 2012 04:18:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI4IgL4051844; Tue, 18 Dec 2012 04:18:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBI4Ig2j051841; Tue, 18 Dec 2012 04:18:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212180418.qBI4Ig2j051841@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 18 Dec 2012 04:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244373 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 04:18:43 -0000 Author: kib Date: Tue Dec 18 04:18:42 2012 New Revision: 244373 URL: http://svnweb.freebsd.org/changeset/base/244373 Log: MFC r243869: Fix a race between kern_setitimer() and realitexpire(), by using the process mutex to interlock the callout start. Modified: stable/9/sys/kern/init_main.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_time.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/init_main.c ============================================================================== --- stable/9/sys/kern/init_main.c Tue Dec 18 01:23:37 2012 (r244372) +++ stable/9/sys/kern/init_main.c Tue Dec 18 04:18:42 2012 (r244373) @@ -497,7 +497,7 @@ proc0_init(void *dummy __unused) strncpy(p->p_comm, "kernel", sizeof (p->p_comm)); strncpy(td->td_name, "swapper", sizeof (td->td_name)); - callout_init(&p->p_itcallout, CALLOUT_MPSAFE); + callout_init_mtx(&p->p_itcallout, &p->p_mtx, 0); callout_init_mtx(&p->p_limco, &p->p_mtx, 0); callout_init(&td->td_slpcallout, CALLOUT_MPSAFE); Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Tue Dec 18 01:23:37 2012 (r244372) +++ stable/9/sys/kern/kern_fork.c Tue Dec 18 04:18:42 2012 (r244373) @@ -592,7 +592,7 @@ do_fork(struct thread *td, int flags, st LIST_INIT(&p2->p_children); LIST_INIT(&p2->p_orphans); - callout_init(&p2->p_itcallout, CALLOUT_MPSAFE); + callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0); /* * If PF_FORK is set, the child process inherits the Modified: stable/9/sys/kern/kern_time.c ============================================================================== --- stable/9/sys/kern/kern_time.c Tue Dec 18 01:23:37 2012 (r244372) +++ stable/9/sys/kern/kern_time.c Tue Dec 18 04:18:42 2012 (r244373) @@ -659,13 +659,11 @@ realitexpire(void *arg) struct timeval ctv, ntv; p = (struct proc *)arg; - PROC_LOCK(p); kern_psignal(p, SIGALRM); if (!timevalisset(&p->p_realtimer.it_interval)) { timevalclear(&p->p_realtimer.it_value); if (p->p_flag & P_WEXIT) wakeup(&p->p_itcallout); - PROC_UNLOCK(p); return; } for (;;) { @@ -677,7 +675,6 @@ realitexpire(void *arg) timevalsub(&ntv, &ctv); callout_reset(&p->p_itcallout, tvtohz(&ntv) - 1, realitexpire, p); - PROC_UNLOCK(p); return; } } From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 04:23:45 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B29F383; Tue, 18 Dec 2012 04:23:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E1C7E8FC0A; Tue, 18 Dec 2012 04:23:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI4Ni7W052676; Tue, 18 Dec 2012 04:23:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBI4Niiu052675; Tue, 18 Dec 2012 04:23:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212180423.qBI4Niiu052675@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 18 Dec 2012 04:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244374 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 04:23:45 -0000 Author: kib Date: Tue Dec 18 04:23:44 2012 New Revision: 244374 URL: http://svnweb.freebsd.org/changeset/base/244374 Log: MFC r244238: Line up the continuation backslashes. Modified: stable/9/sys/sys/mount.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/mount.h ============================================================================== --- stable/9/sys/sys/mount.h Tue Dec 18 04:18:42 2012 (r244373) +++ stable/9/sys/sys/mount.h Tue Dec 18 04:23:44 2012 (r244374) @@ -198,8 +198,8 @@ struct vnode *__mnt_vnode_next_all(struc struct vnode *__mnt_vnode_first_all(struct vnode **mvp, struct mount *mp); void __mnt_vnode_markerfree_all(struct vnode **mvp, struct mount *mp); -#define MNT_VNODE_FOREACH_ALL(vp, mp, mvp) \ - for (vp = __mnt_vnode_first_all(&(mvp), (mp)); \ +#define MNT_VNODE_FOREACH_ALL(vp, mp, mvp) \ + for (vp = __mnt_vnode_first_all(&(mvp), (mp)); \ (vp) != NULL; vp = __mnt_vnode_next_all(&(mvp), (mp))) #define MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp) \ From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 04:27:33 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDE78653; Tue, 18 Dec 2012 04:27:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D12E18FC0C; Tue, 18 Dec 2012 04:27:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI4RXSh053272; Tue, 18 Dec 2012 04:27:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBI4RXpj053271; Tue, 18 Dec 2012 04:27:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212180427.qBI4RXpj053271@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 18 Dec 2012 04:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244375 - stable/9/sys/ufs/ufs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 04:27:34 -0000 Author: kib Date: Tue Dec 18 04:27:33 2012 New Revision: 244375 URL: http://svnweb.freebsd.org/changeset/base/244375 Log: MFC r244239: Fix a typo, resulting in the NULL pointer dereference. Modified: stable/9/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_quota.c Tue Dec 18 04:23:44 2012 (r244374) +++ stable/9/sys/ufs/ufs/ufs_quota.c Tue Dec 18 04:27:33 2012 (r244375) @@ -1052,7 +1052,7 @@ again: error = vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td); if (error) { if (error == ENOENT) { - MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp); + MNT_VNODE_FOREACH_ACTIVE_ABORT(mp, mvp); goto again; } continue; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 04:38:35 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1FDC894; Tue, 18 Dec 2012 04:38:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 84BFA8FC16; Tue, 18 Dec 2012 04:38:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI4cZtM054965; Tue, 18 Dec 2012 04:38:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBI4cZwJ054963; Tue, 18 Dec 2012 04:38:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212180438.qBI4cZwJ054963@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 18 Dec 2012 04:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244376 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 04:38:35 -0000 Author: kib Date: Tue Dec 18 04:38:34 2012 New Revision: 244376 URL: http://svnweb.freebsd.org/changeset/base/244376 Log: MFC r243835: The vnode_free_list_mtx is required unconditionally when iterating over the active list. MFC r244095: Do not yield while owning a mutex, by stopping acquiring mount interlock. MFC r244240: Use user priority for the yield, do not spin on UP. Restructure the iteration initializer and the iterator to remove code duplication. Modified: stable/9/sys/kern/vfs_subr.c stable/9/sys/sys/mount.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Tue Dec 18 04:27:33 2012 (r244375) +++ stable/9/sys/kern/vfs_subr.c Tue Dec 18 04:38:34 2012 (r244376) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -4697,20 +4698,54 @@ __mnt_vnode_markerfree_all(struct vnode * These are helper functions for filesystems to traverse their * active vnodes. See MNT_VNODE_FOREACH_ACTIVE() in sys/mount.h */ -struct vnode * -__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) +static void +mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *mp) { - struct vnode *vp, *nvp; - if (should_yield()) - kern_yield(PRI_UNCHANGED); + KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); + MNT_ILOCK(mp); + MNT_REL(mp); + MNT_IUNLOCK(mp); + free(*mvp, M_VNODE_MARKER); + *mvp = NULL; +} + +#ifdef SMP +#define ALWAYS_YIELD (mp_ncpus == 1) +#else +#define ALWAYS_YIELD 1 +#endif + +static struct vnode * +mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) +{ + struct vnode *vp, *nvp; + + mtx_assert(&vnode_free_list_mtx, MA_OWNED); KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); +restart: vp = TAILQ_NEXT(*mvp, v_actfreelist); + TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); while (vp != NULL) { - VI_LOCK(vp); - if (vp->v_mount == mp && vp->v_type != VMARKER && - (vp->v_iflag & VI_DOOMED) == 0) + if (vp->v_type == VMARKER) { + vp = TAILQ_NEXT(vp, v_actfreelist); + continue; + } + if (!VI_TRYLOCK(vp)) { + if (ALWAYS_YIELD || should_yield()) { + TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); + mtx_unlock(&vnode_free_list_mtx); + kern_yield(PRI_USER); + mtx_lock(&vnode_free_list_mtx); + goto restart; + } + continue; + } + KASSERT(vp->v_type != VMARKER, ("locked marker %p", vp)); + KASSERT(vp->v_mount == mp || vp->v_mount == NULL, + ("alien vnode on the active list %p %p", vp, mp)); + if (vp->v_mount == mp && (vp->v_iflag & VI_DOOMED) == 0) break; nvp = TAILQ_NEXT(vp, v_actfreelist); VI_UNLOCK(vp); @@ -4719,73 +4754,60 @@ __mnt_vnode_next_active(struct vnode **m /* Check if we are done */ if (vp == NULL) { - __mnt_vnode_markerfree_active(mvp, mp); - /* MNT_IUNLOCK(mp); -- done in above function */ - mtx_assert(MNT_MTX(mp), MA_NOTOWNED); + mtx_unlock(&vnode_free_list_mtx); + mnt_vnode_markerfree_active(mvp, mp); return (NULL); } - mtx_lock(&vnode_free_list_mtx); - TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); mtx_unlock(&vnode_free_list_mtx); - MNT_IUNLOCK(mp); + ASSERT_VI_LOCKED(vp, "active iter"); + KASSERT((vp->v_iflag & VI_ACTIVE) != 0, ("Non-active vp %p", vp)); return (vp); } +#undef ALWAYS_YIELD + +struct vnode * +__mnt_vnode_next_active(struct vnode **mvp, struct mount *mp) +{ + + if (should_yield()) + kern_yield(PRI_UNCHANGED); + mtx_lock(&vnode_free_list_mtx); + return (mnt_vnode_next_active(mvp, mp)); +} struct vnode * __mnt_vnode_first_active(struct vnode **mvp, struct mount *mp) { - struct vnode *vp, *nvp; + struct vnode *vp; *mvp = malloc(sizeof(struct vnode), M_VNODE_MARKER, M_WAITOK | M_ZERO); MNT_ILOCK(mp); MNT_REF(mp); + MNT_IUNLOCK(mp); (*mvp)->v_type = VMARKER; + (*mvp)->v_mount = mp; + mtx_lock(&vnode_free_list_mtx); vp = TAILQ_FIRST(&mp->mnt_activevnodelist); - while (vp != NULL) { - VI_LOCK(vp); - if (vp->v_mount == mp && vp->v_type != VMARKER && - (vp->v_iflag & VI_DOOMED) == 0) - break; - nvp = TAILQ_NEXT(vp, v_actfreelist); - VI_UNLOCK(vp); - vp = nvp; - } - - /* Check if we are done */ if (vp == NULL) { - MNT_REL(mp); - MNT_IUNLOCK(mp); - free(*mvp, M_VNODE_MARKER); - *mvp = NULL; + mtx_unlock(&vnode_free_list_mtx); + mnt_vnode_markerfree_active(mvp, mp); return (NULL); } - (*mvp)->v_mount = mp; - mtx_lock(&vnode_free_list_mtx); - TAILQ_INSERT_AFTER(&mp->mnt_activevnodelist, vp, *mvp, v_actfreelist); - mtx_unlock(&vnode_free_list_mtx); - MNT_IUNLOCK(mp); - return (vp); + TAILQ_INSERT_BEFORE(vp, *mvp, v_actfreelist); + return (mnt_vnode_next_active(mvp, mp)); } void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *mp) { - if (*mvp == NULL) { - MNT_IUNLOCK(mp); + if (*mvp == NULL) return; - } - - mtx_assert(MNT_MTX(mp), MA_OWNED); - KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch")); mtx_lock(&vnode_free_list_mtx); TAILQ_REMOVE(&mp->mnt_activevnodelist, *mvp, v_actfreelist); mtx_unlock(&vnode_free_list_mtx); - MNT_REL(mp); - MNT_IUNLOCK(mp); - free(*mvp, M_VNODE_MARKER); - *mvp = NULL; + mnt_vnode_markerfree_active(mvp, mp); } Modified: stable/9/sys/sys/mount.h ============================================================================== --- stable/9/sys/sys/mount.h Tue Dec 18 04:27:33 2012 (r244375) +++ stable/9/sys/sys/mount.h Tue Dec 18 04:38:34 2012 (r244376) @@ -217,17 +217,12 @@ struct vnode *__mnt_vnode_next_active(st struct vnode *__mnt_vnode_first_active(struct vnode **mvp, struct mount *mp); void __mnt_vnode_markerfree_active(struct vnode **mvp, struct mount *); -#define MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) \ - for (vp = __mnt_vnode_first_active(&(mvp), (mp)); \ +#define MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) \ + for (vp = __mnt_vnode_first_active(&(mvp), (mp)); \ (vp) != NULL; vp = __mnt_vnode_next_active(&(mvp), (mp))) #define MNT_VNODE_FOREACH_ACTIVE_ABORT(mp, mvp) \ - do { \ - MNT_ILOCK(mp); \ - __mnt_vnode_markerfree_active(&(mvp), (mp)); \ - /* MNT_IUNLOCK(mp); -- done in above function */ \ - mtx_assert(MNT_MTX(mp), MA_NOTOWNED); \ - } while (0) + __mnt_vnode_markerfree_active(&(mvp), (mp)) /* * Definitions for MNT_VNODE_FOREACH. From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 06:55:14 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9702954D; Tue, 18 Dec 2012 06:55:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 77EF08FC12; Tue, 18 Dec 2012 06:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI6tEGL077352; Tue, 18 Dec 2012 06:55:14 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBI6tEsD077348; Tue, 18 Dec 2012 06:55:14 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201212180655.qBI6tEsD077348@svn.freebsd.org> From: Hiroki Sato Date: Tue, 18 Dec 2012 06:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244379 - in stable/9/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/xml share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 06:55:14 -0000 Author: hrs Date: Tue Dec 18 06:55:13 2012 New Revision: 244379 URL: http://svnweb.freebsd.org/changeset/base/244379 Log: - Trim old entries. - Update errata items. - Bump &release.*; Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/9/release/doc/en_US.ISO8859-1/share/xml/release.dsl stable/9/release/doc/share/xml/release.dsl stable/9/release/doc/share/xml/release.ent Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Dec 18 06:37:23 2012 (r244378) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.xml Tue Dec 18 06:55:13 2012 (r244379) @@ -1,22 +1,3 @@ - - -%entities; - - -%release; - - -]]> - -]]> - -]]> -]> - + + +%entities; + +%release; +]>
- &os; &release; Errata + &os; +<![ %release.type.current [ + &release.current; +]]> +<![ %release.type.snapshot [ + &release.prev; +]]> +<![ %release.type.release [ + &release.current; +]]> + Errata The &os; Project @@ -132,11 +130,10 @@ - - - - - + + + + Advisory Date @@ -146,194 +143,68 @@ - SA-11:01.mountd - 20 April 2011 - Network ACL mishandling in &man.mountd.8; + SA-12:01.openssl + 3 May 2012 + OpenSSL multiple vulnerabilities - SA-11:02.bind - 28 May 2011 - BIND remote DoS with large RRSIG RRsets and negative - caching + SA-12:02.crypt + 30 May 2012 + Incorrect crypt() hashing - SA-11:04.compress - 28 September 2011 - Errors handling corrupt compress file in - &man.compress.1; and &man.gzip.1; + SA-12:03.bind + 12 June 2012 + Incorrect handling of zero-length RDATA fields in &man.named.8; - SA-11:05.unix - 28 September 2011 - Buffer overflow in handling of UNIX socket - addresses + SA-12:04.sysret + 12 June 2012 + Privilege escalation when returning from kernel - SA-11:06.bind - 23 December 2011 - Remote packet Denial of Service against &man.named.8; - servers + SA-12:05.bind + 6 August 2012 + &man.named.8; DNSSEC validation Denial of Service - SA-11:07.chroot - 23 December 2011 - Code execution via chrooted ftpd + SA-12:06.bind + 22 November 2012 + Multiple Denial of Service vulnerabilities with &man.named.8; - SA-11:08.telnetd - 23 December 2011 - telnetd code execution vulnerability + SA-12:07.hostapd + 22 November 2012 + Insufficient message length validation for EAP-TLS messages - SA-11:09.pam_ssh - 23 December 2011 - pam_ssh improperly grants access when user account has - unencrypted SSH private keys - - - - SA-11:10.pam - 23 December 2011 - pam_start() does not validate - service names + SA-12:08.linux + 22 November 2012 + Linux compatibility layer input validation error - - Open Issues - - - - In some releases prior to &release.current;, upgrading - by using &man.freebsd-update.8; can fail. This issue has - been fixed by a change in Errata Notice EN-12:01. For more - information, see - - - - &os; &release.current; includes - several changes to improve resource management of PCI - devices. Some x86 machines may not boot or may have devices - that no longer attach when using ACPI as a result of these - changes. This can be worked around by setting a - &man.loader.8; tunable - debug.acpi.disabled to - hostres. To do this, enter the following - lines at the loader prompt: - - set debug.acpi.disabled="hostres" -boot - - Or, put the following line into - /boot/loader.conf: - - debug.acpi.disabled="hostres" - - - - A &man.devctl.4; event upon arrival of a &man.ugen.4; - device has been changed. The event now includes - ugen and cdev - variables instead of device-name. This - change can prevent the following &man.devd.8; rule which - worked in a previous releases from working: - - attach 0 { - match "device-name" "ugen[0-9]+.[0-9]+"; - action "/path/to/script /dev/$device-name"; -} - - This should be updated to the following: - - attach 0 { - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "cdev" "ugen[0-9]+.[0-9]+"; - action "/path/to/script /dev/$cdev"; -} - - - - The &os; &release.current; Release Notes should have - mentioned that SSM (Source-Specific Multicast) MLDv2 now - uses ALLOW_NEW_SOURCES and - BLOCK_OLD_SOURCES record types to signal - a join or a leave by default. This conforms RFC 4604, - Using Internet Group Management Protocol Version 3 - (IGMPv3) and Multicast Listener Discovery Protocol Version 2 - (MLDv2) for Source-Specific Multicast. A new - &man.sysctl.8; variable - net.inet6.mld.use_allow which controls - the behavior has been added. The default value is - 1 (use - ALLOW_NEW_SOURCES and - BLOCK_OLD_SOURCES). - - - - &release.current; fails to configure an interface - specified in the &man.rc.conf.5; variable - ipv6_prefix_IF - when the interface does not have a corresponding - ifconfig_IF_ipv6 - variable. This problem will be fixed in the future - releases. To work around this problem on &release.current;, - add an - ifconfig_IF_ipv6 - line for each interface specified in - ipv6_prefix_IF - as the following: - - ipv6_prefix_em0="2001:db8:1:0 2001:db8:2:0" -ifconfig_em0_ipv6="inet6 auto_linklocal" - - - - In &release.current; the &os; USB subsystem supports USB - 3.0 by the &man.xhci.4; driver. However, a bug that could - prevent it from working with a USB 3.0 hub has been found - and fixed after the release date. This means - &release.current; and prior do not work with a USB 3.0 hub. - This problem has been fixed in HEAD and will be merged into - the 9-STABLE branch. - - - - Late-Breaking News -No news. -]]> - -No news. -]]> - -No news. -]]> -
Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Dec 18 06:37:23 2012 (r244378) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Dec 18 06:55:13 2012 (r244379) @@ -70,1303 +70,10 @@ - What's New + What's New - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. - - - Security Advisories - - Problems described in the following security advisories have - been fixed. For more information, consult the individual - advisories available from - . - - - - - - - - - Advisory - Date - Topic - - - - - - SA-11:01.mountd - 20 April 2011 - Network ACL mishandling in &man.mountd.8; - - - - SA-11:02.bind - 28 May 2011 - BIND remote DoS with large RRSIG RRsets and negative - caching - - - - SA-11:04.compress - 28 September 2011 - Errors handling corrupt compress file in - &man.compress.1; and &man.gzip.1; - - - - SA-11:05.unix - 28 September 2011 - Buffer overflow in handling of UNIX socket - addresses - - - - SA-11:06.bind - 23 December 2011 - Remote packet Denial of Service against &man.named.8; - servers - - - - SA-11:07.chroot - 23 December 2011 - Code execution via chrooted ftpd - - - - SA-11:08.telnetd - 23 December 2011 - telnetd code execution vulnerability - - - - SA-11:09.pam_ssh - 23 December 2011 - pam_ssh improperly grants access when user account has - unencrypted SSH private keys - - - - SA-11:10.pam - 23 December 2011 - pam_start() does not validate - service names - - - - - - - - Kernel Changes - - The &os; kernel now supports Capsicum - Capability Mode. Capsicum is a set of features for sandboxing - support, using a capability model in which the capabilities - are file descriptors. Two new kernel options - CAPABILITIES and - CAPABILITY_MODE have been added to the - GENERIC kernel. For more information - about Capsicum, see . - - The &os; - &man.dtrace.1; framework now supports - systrace for system calls of - linux32 and freebsd32 on - &os;/&arch.amd64;. Two new - systrace_linux32 and - systrace_freebsd32 kernel modules provide - support for tracing compat system calls in addition to the native - system call tracing provided by the - systrace module. - - The - &os; ELF image activator now supports the - PT_GNU_STACK program header. This is - disabled by default. New &man.sysctl.8; variables - kern.elf32.nxstack and - kern.elf64.nxstack allow enabling - PT_GNU_STACK for the specified ABIs - (e.g. elf32 for 32-bit ABI). - - The &man.hhook.9; (Helper Hook) - and &man.khelp.9; (Kernel Helpers) KPIs have been implemented. - These are a kind of superset of &man.pfil.9; framework for - more general use in the kernel. The &man.hhook.9; KPI - provides a way for kernel subsystems to export hook points - that &man.khelp.9; modules can hook to provide enhanced or new - functionality to the kernel. The &man.khelp.9; KPI provides a - framework for managing &man.khelp.9; modules, which indirectly - use the &man.hhook.9; KPI to register their hook functions - with hook points of interest within the kernel. These allow a - structured way to dynamically extend the kernel at runtime in - an ABI preserving manner. - - A &man.loader.8; - tunable hw.memtest.tests has been added. - This controls whether to perform memory testing at boot time - or not. The default value is 1 (perform a - memory test). - - A new resource accounting API has been - implemented. It can keep per-process, per-jail, and - per-loginclass resource accounting information. Note that - this is not built nor installed by default. To build and - install them, specify options RACCT in the - kernel configuration file and rebuild the base system as - described in the &os; - Handbook. - - A new resource-limiting API has been - implemented. It works in conjunction with the - RACCT resource accounting implementation - and takes user-configurable actions based on the set of rules - it maintains and the current resource usage. The &man.rctl.8; - utility has been added to manage the rules in userland. Note - that this is not built nor installed by default. To build and - install them, specify options RCTL in the - kernel configuration file and rebuild the base system as - described in the &os; - Handbook. - - The &man.sendmsg.2; and &man.recvmsg.2; - system calls in the &os; Linux ABI compatibility have been - improved. - - The &man.open.2; and &man.fhopen.2; - system calls now support the O_CLOEXEC flag, - which allows setting the FD_CLOEXEC flag for the - newly created file descriptor. This is standardized in IEEE - Std 1003.1-2008 (POSIX, Single UNIX Specification Version - 4). - - The &man.posix.fallocate.2; system call has - been implemented. This is a function in POSIX to ensure that - a part of the storage for regular file data is allocated on the - file system storage media. - - Two new system calls - setloginclass(2) and - getloginclass(2) have been added. This - makes it possible for the kernel to track the login class a - process is assigned to, which is required for the - RCTL resource limiting framework. - - &os; now supports executing - &os; 1/&arch.i386; a.out binaries on &os;/&arch.amd64;. Note - that this is not built nor installed by default. To build and - install them, specify options COMPAT_43 in - the kernel configuration file and rebuild the base system as - described in the &os; - Handbook. - - The following - &man.sysctl.8; variables have been added to show the availability - of various kernel features: - - - - - - - - &man.sysctl.8; variable name - Description - - - - - - kern.features.ufs_acl - ACL (Access Control List) support in UFS - - - - kern.features.ufs_gjournal - journaling support through &man.gjournal.8; for - UFS - - - - kern.features.ufs_quota - UFS disk quotas support - - - - kern.features.ufs_quota64 - 64-bit UFS disk quotas support - - - - kern.features.softupdates - FFS soft-updates support - - - - kern.features.ffs_snapshot - FFS snapshot support - - - - kern.features.nfsclient - NFS client (old implementation) - - - - kern.features.nfscl - NFS client (new implementation) - - - - kern.features.nfsserver - NFS server (old implementation) - - - - kern.features.nfsd - NFS server (new implementation) - - - - kern.features.kdtrace_hooks - Kernel DTrace hooks which are required to load - DTrace kernel modules - - - - kern.features.ktr - Kernel support for KTR kernel tracing facility - - - - kern.features.ktrace - Kernel support for system call tracing - - - - kern.features.hwpmc_hooks - Kernel support for HW PMC - - - - kern.features.sysv_msg - System V message queues support - - - - kern.features.sysv_sem - System V semaphores support - - - - kern.features.p1003_1b_mqueue - POSIX P1003.1B message queues support - - - - kern.features.p1003_1b_semaphores - POSIX P1003.1B semaphores support - - - - kern.features.kposix_priority_scheduling - POSIX P1003.1B real-time extensions - - - - kern.features.stack - Support for capturing the kernel stack - - - - kern.features.sysv_shm - System V shared memory segments support - - - - kern.features.pps_sync - Support usage of external PPS signal by kernel PLL - - - - kern.features.regression - Kernel support for interfaces necessary for - regression testing - - - - kern.features.invariant_support - Support for modules compiled with the INVARIANTS option - - - - kern.features.zero_copy_sockets - Zero copy sockets support - - - - kern.features.libmchain - mchain library - - - - kern.features.scbus - SCSI devices support - - - - kern.features.mac - Mandatory Access Control Framework support - - - - kern.features.audit - BSM audit support - - - - kern.features.geom_gate - GEOM Gate module - - - - kern.features.geom_uzip - GEOM uzip read-only compressed disks support - - - - kern.features.geom_cache - GEOM cache module - - - - kern.features.geom_mirror - GEOM mirroring support - - - - kern.features.geom_stripe - GEOM striping support - - - - kern.features.geom_concat - GEOM concatenation support - - - - kern.features.geom_raid3 - GEOM RAID-3 functionality - - - - kern.features.geom_fox - GEOM FOX redundant path mitigation support - - - - kern.features.geom_multipath - GEOM multipath support - - - - kern.features.g_virstor - GEOM virtual storage support - - - - kern.features.geom_bde - GEOM-based Disk Encryption - - - - kern.features.geom_eli - GEOM crypto module - - - - kern.features.geom_journal - GEOM journaling support - - - - kern.features.geom_shsec - GEOM shared secret device support - - - - kern.features.geom_vol - GEOM support for volume names from UFS superblocks - - - - kern.features.geom_label - GEOM labeling support - - - - kern.features.geom_sunlabel - GEOM Sun/Solaris partitioning support - - - - kern.features.geom_bsd - GEOM BSD disklabels support - - - - kern.features.geom_pc98 - GEOM NEC PC9800 partitioning support - - - - kern.features.geom_linux_lvm - GEOM Linux LVM partitioning support - - - - kern.features.geom_part_pc98 - GEOM partitioning class for PC-9800 disk partitions - - - - kern.features.geom_part_vtoc8 - GEOM partitioning class for SMI VTOC8 disk labels - - - - kern.features.geom_part_bsd - GEOM partitioning class for BSD disklabels - - - - kern.features.geom_part_ebr - GEOM partitioning class for extended boot records support - - - - kern.features.geom_part_ebr_compat - GEOM EBR partitioning class: - backward-compatible partition names - - - - kern.features.geom_part_gpt - GEOM partitioning class for GPT partitions - support - - - - kern.features.geom_part_apm - GEOM partitioning class for Apple-style - partitions - - - - kern.features.geom_part_mbr - GEOM partitioning class for MBR support - - - - - - - Boot Loader Changes - - The default boot loader menu has been - updated. - - The &man.loader.8; loader - now supports PBVM (Pre-Boot Virtual Memory). This allows - linking the kernel at a fixed virtual address without having to - make any assumptions about the physical memory layout. The - PBVM also allows fine control of the address where the - kernel and its modules are to be loaded. - - - - Hardware Support - - &os;/powerpc now - supports Sony Playstation 3 using the OtherOS feature - available on firmwares 3.15 and earlier. - - A new &man.loader.8; tunable - machdep.disable_tsc has been added. - Setting this to a non-zero value disables use of TSC (Time - Stamp Counter) by turning off boot-time CPU frequency - calibration, DELAY(9) with TSC, and using TSC as a CPU - ticker. Another new &man.loader.8; tunable - machdep.disable_tsc_calibration allows to - skip the TSC frequency calibration only. This is useful when - one wants to use the nominal frequency of the chip in Intel - processors, for example. - - The &os; &man.usb.4; - subsystem now supports USB 3.0 by default. - - The &os; &man.usb.4; subsystem now - supports USB packet filter. This allows to capture packets - which go through each USB host controller. The - implementation is almost based on &man.bpf.4; code. - The userland program &man.usbdump.8; has been added. - - - Network Interface Support - - A bug in the &man.alc.4; driver which - could make AR8152-based network interfaces stop working - has been fixed. - - A bxe(4) driver for Broadcom - NetXtreme II 10GbE controllers (BCM57710, BCM57711, - BCM57711E) has been added. - - The &man.cxgb.4; driver has been - updated to version 7.11.0. - - A &man.cxgbe.4; driver for Chelsio - T4 (Terminator 4) based 10Gb/1Gb adapters has been - added. - - The &man.dc.4; driver - now works correctly in kernels with the - option. - - The &man.em.4; driver has been - updated to version 7.3.2. - - The &man.igb.4; driver has been - updated to version 2.2.5. - - The &man.igb.4; driver now supports - Intel I350 PCIe Gigabit Ethernet controllers. - - The &man.ixgbe.4; driver has been - updated to version 2.3.8. - - Firmware images in the &man.iwn.4; - driver for 1000, 5000, 6000, and 6500 series cards have been - updated. - - A bug in the &man.msk.4; driver has been - fixed. It could prevent RX checksum offloading from - working. - - A bug in the &man.nfe.4; driver which - could prevent reinitialization after changing the MTU has - been fixed. - - A bug in the &man.ral.4; and &man.run.4; - drivers which could prevent hostap mode - from working has been fixed. - - A rdcphy(4) driver for RDC Semiconductor - R6040 10/100 PHY has been added. - - The &man.re.4; driver now supports - RTL8168E/8111E-VL PCIe Gigabit Ethernet controllers and - RTL8401E PCIe Fast Ethernet controllers. - - The &man.re.4; driver now supports - TX interrupt moderation on RTL810xE PCIe Fast Ethernet - controllers. - - The &man.re.4; driver now supports - another mechanism for RX interrupt moderation because of - performance problems. A &man.sysctl.8; variable - dev.re.N.int_rx_mod - has been added to control amount of time to delay RX - interrupt processing, in units of microsecond. Setting it - to 0 completely disables RX interrupt - moderation. A &man.loader.8; tunable - hw.re.intr_filter controls whether the - old mechanism utilizing MSI/MSI-X capability on - supported controllers is used or not. When set to - a non-zero value, the &man.re.4; driver uses the old - mechanism. The default value is 0 and - this tunable has no effect on controllers without MSI/MSI-X - capability. - - The &man.re.4; driver now - supports TSO (TCP Segmentation Offload) on RealTek - RTL8168/8111 C or later controllers. Note that this is - disabled by default because broken frames can be sent - under certain conditions. - - The &man.re.4; driver now - supports enabling TX and/or RX checksum offloading - independently from each other. Note that TX IP checksum - is disabled on some RTL8168C-based network interfaces - because it can generate an incorrect IP checksum when the - packet contains IP options. - - A bug in the &man.re.4; driver has - been fixed. It could cause a panic when receiving a jumbo - frame on an RTL8169C, 8169D, or 8169E controller-based - network interface. - - The &man.re.4; driver now supports - RTL8105E PCIe Fast Ethernet controllers. - - The rlphy(4) driver now supports the - Realtek RTL8201E 10/100 PHY found in RTL8105E - controllers. - - A bug in the &man.sis.4; driver has - been fixed. It could prevent a proper reinitialization - on DP83815, DP83816, and SiS 900/7016 controllers when the - configuration of multicast packet handling and/or - promiscuous mode is changed. - - A bug in the &man.vlan.4; pseudo interface - han been fixed. It could have a random interface - identifier in an automatically configured IPv6 link-local - address, instead of one generated with the parent - interface's IEEE 802 48-bit MAC address and an algorithm - described in RFC 4291. - - A &man.vte.4; driver for RDC R6040 Fast - Ethernet controllers, which are commonly found on the Vortex86 - System On a Chip, has been added. - - A &man.vxge.4; driver for the Neterion - X3100 10GbE Server/Storage adapter has been added. - - A bug in the &man.wpi.4; driver has been - fixed. It could display the following error messages and - result in the device being unusable: - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 09:32:46 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6593EB1; Tue, 18 Dec 2012 09:32:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 877078FC0A; Tue, 18 Dec 2012 09:32:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI9Wk2e006464; Tue, 18 Dec 2012 09:32:46 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBI9Wilx006448; Tue, 18 Dec 2012 09:32:44 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212180932.qBI9Wilx006448@svn.freebsd.org> From: Robert Watson Date: Tue, 18 Dec 2012 09:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244390 - in stable/9/contrib/openbsm: . bin bin/audit bin/auditd bin/auditdistd bin/auditfilterd bin/auditreduce bin/praudit bsm compat config etc libauditd libbsm m4 man modules modul... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 09:32:46 -0000 Author: rwatson Date: Tue Dec 18 09:32:44 2012 New Revision: 244390 URL: http://svnweb.freebsd.org/changeset/base/244390 Log: Merge OpenBSM 1.2-alpha3 from head to stable/9, upgrading from the previous OpenBSM 1.1p2: OpenBSM 1.2 alpha 3 - Various minor tweaks to the auditdistd build to make it fit the FreeBSD build environment better. - AUE_WAIT6 merged from FreeBSD 9. OpenBSM 1.2 alpha 2 - auditdistd, a distributed audit trail management daemon, has now been merged. This allows trail files to be securely and reliably synced from audited hosts to an audit server, and employs TLS encryption. Where available, it uses Capsicum to sandbox the service. This work was contributed by Pawel Jakub Dawidek under sponsorship from the FreeBSD Foundation. OpenBSM 1.2 alpha 1 - Add Capsicum-related error numbers for FreeBSD: ENOTCAPABLE, ECAPMODE. - Add Capsicum, process descriptor audit events for FreeBSD. - Allow 0% minspace. - Fixes from the clang static analyser. - Fix expiration of trail files when the host parameter is used. - Various typo fixes. - Support for Solaris privilege and privilege set tokens. - Documentation for getachost(), improvements for getacfilesz(). - Fix a directory descriptor leak that happened when audit trail partitions filled. - Support for more Linux distributions with a partial contemporary endian.h. - Improved escaping of XML-encapsulated BSM. - A variety of minor documentation, style, and functional. A separate commit will merge build changes to enable auditdistd, etc. Obtained from: TrustedBSD Project Sponsored by: The FreeBSD Foundation (auditdistd) Added: stable/9/contrib/openbsm/bin/auditdistd/ - copied from r244360, head/contrib/openbsm/bin/auditdistd/ stable/9/contrib/openbsm/compat/closefrom.h - copied unchanged from r244360, head/contrib/openbsm/compat/closefrom.h stable/9/contrib/openbsm/compat/compat.h - copied unchanged from r244360, head/contrib/openbsm/compat/compat.h stable/9/contrib/openbsm/compat/endian_enc.h - copied unchanged from r244360, head/contrib/openbsm/compat/endian_enc.h stable/9/contrib/openbsm/compat/flopen.h - copied unchanged from r244360, head/contrib/openbsm/compat/flopen.h stable/9/contrib/openbsm/compat/pidfile.h - copied unchanged from r244360, head/contrib/openbsm/compat/pidfile.h stable/9/contrib/openbsm/compat/vis.h - copied unchanged from r244360, head/contrib/openbsm/compat/vis.h stable/9/contrib/openbsm/config/ylwrap - copied unchanged from r244360, head/contrib/openbsm/config/ylwrap stable/9/contrib/openbsm/m4/ - copied from r244360, head/contrib/openbsm/m4/ Modified: stable/9/contrib/openbsm/CREDITS stable/9/contrib/openbsm/INSTALL stable/9/contrib/openbsm/LICENSE stable/9/contrib/openbsm/Makefile.am stable/9/contrib/openbsm/Makefile.in stable/9/contrib/openbsm/NEWS stable/9/contrib/openbsm/README stable/9/contrib/openbsm/TODO stable/9/contrib/openbsm/VERSION stable/9/contrib/openbsm/aclocal.m4 stable/9/contrib/openbsm/autogen.sh stable/9/contrib/openbsm/bin/Makefile.am stable/9/contrib/openbsm/bin/Makefile.in stable/9/contrib/openbsm/bin/audit/Makefile.am stable/9/contrib/openbsm/bin/audit/Makefile.in stable/9/contrib/openbsm/bin/audit/audit.8 stable/9/contrib/openbsm/bin/auditd/Makefile.am stable/9/contrib/openbsm/bin/auditd/Makefile.in stable/9/contrib/openbsm/bin/auditd/auditd.8 stable/9/contrib/openbsm/bin/auditd/auditd.c stable/9/contrib/openbsm/bin/auditfilterd/Makefile.am stable/9/contrib/openbsm/bin/auditfilterd/Makefile.in stable/9/contrib/openbsm/bin/auditreduce/Makefile.am stable/9/contrib/openbsm/bin/auditreduce/Makefile.in stable/9/contrib/openbsm/bin/auditreduce/auditreduce.1 stable/9/contrib/openbsm/bin/praudit/Makefile.am stable/9/contrib/openbsm/bin/praudit/Makefile.in stable/9/contrib/openbsm/bin/praudit/praudit.1 stable/9/contrib/openbsm/bin/praudit/praudit.c stable/9/contrib/openbsm/bsm/Makefile.am stable/9/contrib/openbsm/bsm/Makefile.in stable/9/contrib/openbsm/bsm/auditd_lib.h stable/9/contrib/openbsm/bsm/libbsm.h stable/9/contrib/openbsm/compat/endian.h stable/9/contrib/openbsm/config/config.h stable/9/contrib/openbsm/config/config.h.in stable/9/contrib/openbsm/config/ltmain.sh stable/9/contrib/openbsm/configure stable/9/contrib/openbsm/configure.ac stable/9/contrib/openbsm/etc/audit_control stable/9/contrib/openbsm/etc/audit_event stable/9/contrib/openbsm/libauditd/Makefile.am stable/9/contrib/openbsm/libauditd/Makefile.in stable/9/contrib/openbsm/libauditd/auditd_lib.c stable/9/contrib/openbsm/libbsm/Makefile.am stable/9/contrib/openbsm/libbsm/Makefile.in stable/9/contrib/openbsm/libbsm/au_control.3 stable/9/contrib/openbsm/libbsm/au_fcntl_cmd.3 stable/9/contrib/openbsm/libbsm/au_io.3 stable/9/contrib/openbsm/libbsm/audit_submit.3 stable/9/contrib/openbsm/libbsm/bsm_audit.c stable/9/contrib/openbsm/libbsm/bsm_class.c stable/9/contrib/openbsm/libbsm/bsm_control.c stable/9/contrib/openbsm/libbsm/bsm_errno.c stable/9/contrib/openbsm/libbsm/bsm_io.c stable/9/contrib/openbsm/libbsm/bsm_token.c stable/9/contrib/openbsm/libbsm/bsm_user.c stable/9/contrib/openbsm/libbsm/bsm_wrappers.c stable/9/contrib/openbsm/man/Makefile.am stable/9/contrib/openbsm/man/Makefile.in stable/9/contrib/openbsm/man/audit.log.5 stable/9/contrib/openbsm/man/audit_control.5 stable/9/contrib/openbsm/man/auditon.2 stable/9/contrib/openbsm/man/getaudit.2 stable/9/contrib/openbsm/man/setaudit.2 stable/9/contrib/openbsm/modules/Makefile.am stable/9/contrib/openbsm/modules/Makefile.in stable/9/contrib/openbsm/modules/auditfilter_noop/Makefile.am stable/9/contrib/openbsm/modules/auditfilter_noop/Makefile.in stable/9/contrib/openbsm/sys/Makefile.am stable/9/contrib/openbsm/sys/Makefile.in stable/9/contrib/openbsm/sys/bsm/Makefile.am stable/9/contrib/openbsm/sys/bsm/Makefile.in stable/9/contrib/openbsm/sys/bsm/audit_errno.h stable/9/contrib/openbsm/sys/bsm/audit_internal.h stable/9/contrib/openbsm/sys/bsm/audit_kevents.h stable/9/contrib/openbsm/sys/bsm/audit_record.h stable/9/contrib/openbsm/test/Makefile.am stable/9/contrib/openbsm/test/Makefile.in stable/9/contrib/openbsm/test/bsm/Makefile.am stable/9/contrib/openbsm/test/bsm/Makefile.in stable/9/contrib/openbsm/tools/Makefile.am stable/9/contrib/openbsm/tools/Makefile.in Directory Properties: stable/9/contrib/openbsm/ (props changed) Modified: stable/9/contrib/openbsm/CREDITS ============================================================================== --- stable/9/contrib/openbsm/CREDITS Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/CREDITS Tue Dec 18 09:32:44 2012 (r244390) @@ -29,6 +29,12 @@ the development of OpenBSM: Stacey Son Todd Heberlein Gary Hoo + Dave Bertouille + Jonathan Anderson + Pawel Jakub Dawidek + Joel Dahl + Ryan Steinmetz + The FreeBSD Foundation In addition, Coverity, Inc.'s Prevent(tm) static analysis tool and Gimpel Software's FlexeLint tool were used to identify a number of bugs in the Modified: stable/9/contrib/openbsm/INSTALL ============================================================================== --- stable/9/contrib/openbsm/INSTALL Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/INSTALL Tue Dec 18 09:32:44 2012 (r244390) @@ -9,11 +9,17 @@ suppport is found. Typical builds will make If doing development work on OpenBSM with gcc, the following invocation of -configure may be preferred in order to generate full compiler warnings and -force the compile to fail if a warning is found: +configure is preferred in order to generate full compiler warnings and force +the compile to fail if a warning is found: CFLAGS="-Wall -Werror" ./configure +On Linux systems, OpenSSL headers may have to be installed to support +encryption of on-the-wire audit streams using auditdistd; the following +appears to work on Ubuntu: + + sudo apt-get install libssl-dev + To install the library, binaries, and man pages, use: make install Modified: stable/9/contrib/openbsm/LICENSE ============================================================================== --- stable/9/contrib/openbsm/LICENSE Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/LICENSE Tue Dec 18 09:32:44 2012 (r244390) @@ -2,34 +2,37 @@ OpenBSM Copyrights and Licensing OpenBSM is covered by a number of copyrights, with licenses being either two or three clause BSD licenses. Individual file headers should be consulted -for specific copyrights on specific components. The TrustedBSD Project would -appreciate the contribution of fixes and enhancements under identical or -substantially similar licenses: - - * Copyright (c) - * All rights reserved. - * - * - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. +for copyrights on specific elements of the distribution. -$P4: //depot/projects/trustedbsd/openbsm/LICENSE#5 $ +The following copyright and license are asserted over the OpenBSM distribution +as a whole: + + Copyright (c) 2005-2012 Robert N.M. Watson + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +The TrustedBSD Project would appreciate the contribution of fixes and +enhancements under an identical license in order to avoid potentially +confusing license proliferation. + +$P4: //depot/projects/trustedbsd/openbsm/LICENSE#6 $ Modified: stable/9/contrib/openbsm/Makefile.am ============================================================================== --- stable/9/contrib/openbsm/Makefile.am Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/Makefile.am Tue Dec 18 09:32:44 2012 (r244390) @@ -1,6 +1,6 @@ -# -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#4 $ -# +## +## $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#5 $ +## SUBDIRS = \ bsm @@ -17,6 +17,7 @@ SUBDIRS += \ modules \ sys +ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ CHANGELOG \ Modified: stable/9/contrib/openbsm/Makefile.in ============================================================================== --- stable/9/contrib/openbsm/Makefile.in Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/Makefile.in Tue Dec 18 09:32:44 2012 (r244390) @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,14 +13,28 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -# -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#10 $ -# VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -40,10 +54,14 @@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \ - $(top_srcdir)/configure INSTALL NEWS TODO config/config.guess \ - config/config.sub config/depcomp config/install-sh \ - config/ltmain.sh config/missing + $(srcdir)/Makefile.in $(top_srcdir)/config/config.guess \ + $(top_srcdir)/config/config.h.in \ + $(top_srcdir)/config/config.sub \ + $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ + $(top_srcdir)/config/missing $(top_srcdir)/configure INSTALL \ + NEWS TODO config/config.guess config/config.sub config/depcomp \ + config/install-sh config/ltmain.sh config/missing \ + config/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -53,6 +71,7 @@ am__CONFIG_DISTCLEAN_FILES = config.stat mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -62,21 +81,61 @@ RECURSIVE_TARGETS = all-recursive check- install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = bsm libauditd libbsm bin man modules sys DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -90,45 +149,52 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MIG = @MIG@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -137,13 +203,15 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -190,6 +258,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = bsm $(am__append_1) libbsm bin man modules sys +ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ CHANGELOG \ LICENSE \ @@ -200,21 +269,21 @@ EXTRA_DIST = \ all: all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -230,21 +299,20 @@ $(top_builddir)/config.status: $(top_src $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config/config.h: config/stamp-h1 - @if test ! -f $@; then \ - rm -f config/stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f config/stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; else :; fi config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status @rm -f config/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config/config.h $(top_srcdir)/config/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f config/stamp-h1 touch $@ @@ -258,16 +326,16 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool + -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -276,7 +344,11 @@ $(RECURSIVE_TARGETS): done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -284,50 +356,23 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -335,14 +380,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -354,7 +399,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -363,36 +408,65 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) + +clean-cscope: + -rm -f cscope.files + +cscope.files: clean-cscope cscopelist-recursive cscopelist + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) + test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -408,66 +482,84 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -475,26 +567,31 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -515,14 +612,24 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -553,16 +660,22 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -583,6 +696,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -591,18 +706,28 @@ install-data-am: install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -625,24 +750,27 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ - distclean distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am + all all-am am--refresh check check-am clean clean-cscope \ + clean-generic clean-libtool cscope cscopelist \ + cscopelist-recursive ctags ctags-recursive dist dist-all \ + dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Modified: stable/9/contrib/openbsm/NEWS ============================================================================== --- stable/9/contrib/openbsm/NEWS Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/NEWS Tue Dec 18 09:32:44 2012 (r244390) @@ -1,5 +1,36 @@ OpenBSM Version History +OpenBSM 1.2 alpha 3 + +- Various minor tweaks to the auditdistd build to make it fit the FreeBSD + build environment better. +- AUE_WAIT6 merged from FreeBSD 9. + +OpenBSM 1.2 alpha 2 + +- auditdistd, a distributed audit trail management daemon, has now been + merged. This allows trail files to be securely and reliably synced from + audited hosts to an audit server, and employs TLS encryption. Where + available, it uses Capsicum to sandbox the service. This work was + contributed by Pawel Jakub Dawidek under sponsorship from the FreeBSD + Foundation. + +OpenBSM 1.2 alpha 1 + +- Add Capsicum-related error numbers for FreeBSD: ENOTCAPABLE, ECAPMODE. +- Add Capsicum, process descriptor audit events for FreeBSD. +- Allow 0% minspace. +- Fixes from the clang static analyser. +- Fix expiration of trail files when the host parameter is used. +- Various typo fixes. +- Support for Solaris privilege and privilege set tokens. +- Documentation for getachost(), improvements for getacfilesz(). +- Fix a directory descriptor leak that happened when audit trail partitions + filled. +- Support for more Linux distributions with a partial contemporary endian.h. +- Improved escaping of XML-encapsulated BSM. +- A variety of minor documentation, style, and functional. + OpenBSM 1.1p2 - Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC. @@ -464,4 +495,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#43 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#55 $ Modified: stable/9/contrib/openbsm/README ============================================================================== --- stable/9/contrib/openbsm/README Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/README Tue Dec 18 09:32:44 2012 (r244390) @@ -1,4 +1,4 @@ -OpenBSM 1.1p2 +OpenBSM 1.2a2 Introduction @@ -38,6 +38,7 @@ The following programs are included with audit Command line audit control tool auditd Audit management daemon + auditdistd Audit trail distribution daemon auditfilterd Experimental event monitoring framework auditreduce Audit trail reduction tool audump Debugging tool to parse and print audit databases @@ -64,4 +65,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#37 $ +$P4: //depot/projects/trustedbsd/openbsm/README#41 $ Modified: stable/9/contrib/openbsm/TODO ============================================================================== --- stable/9/contrib/openbsm/TODO Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/TODO Tue Dec 18 09:32:44 2012 (r244390) @@ -21,5 +21,7 @@ OpenBSM TODO alternative locations can be used. - NLS support for au_strerror(3), which provides error strings for BSM errors not available on the local OS platform. +- Support for client certificates in auditdistd, to include certificate chain + validation. -$P4: //depot/projects/trustedbsd/openbsm/TODO#13 $ +$P4: //depot/projects/trustedbsd/openbsm/TODO#14 $ Modified: stable/9/contrib/openbsm/VERSION ============================================================================== --- stable/9/contrib/openbsm/VERSION Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/VERSION Tue Dec 18 09:32:44 2012 (r244390) @@ -1 +1 @@ -OPENBSM_1_1p2 +OPENBSM_1_2_alpha3 Modified: stable/9/contrib/openbsm/aclocal.m4 ============================================================================== --- stable/9/contrib/openbsm/aclocal.m4 Tue Dec 18 08:44:59 2012 (r244389) +++ stable/9/contrib/openbsm/aclocal.m4 Tue Dec 18 09:32:44 2012 (r244390) @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- +# generated automatically by aclocal 1.12.2 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,108 +13,206 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(AC_AUTOCONF_VERSION, [2.62],, -[m4_warning([this file was generated for autoconf 2.62. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 10:24:00 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68BAA11D; Tue, 18 Dec 2012 10:24:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4BAF48FC14; Tue, 18 Dec 2012 10:24:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIAO0GJ017374; Tue, 18 Dec 2012 10:24:00 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIANx97017356; Tue, 18 Dec 2012 10:23:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212181023.qBIANx97017356@svn.freebsd.org> From: Robert Watson Date: Tue, 18 Dec 2012 10:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244391 - in stable/9/sys: bsm security/audit X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 10:24:00 -0000 Author: rwatson Date: Tue Dec 18 10:23:58 2012 New Revision: 244391 URL: http://svnweb.freebsd.org/changeset/base/244391 Log: Merge r243751 from head to stable/9: Merge OpenBSM 1.2-alpha2 changes from contrib/openbsm to src/sys/{bsm,security/audit}. There are a few tweaks to help with the FreeBSD build environment that will be merged back to OpenBSM. No significant functional changes appear on the kernel side. Obtained from: TrustedBSD Project Sponsored by: The FreeBSD Foundation (auditdistd) Modified: stable/9/sys/bsm/audit_errno.h stable/9/sys/bsm/audit_internal.h stable/9/sys/bsm/audit_record.h stable/9/sys/security/audit/audit_bsm_errno.c stable/9/sys/security/audit/audit_bsm_token.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/bsm/audit_errno.h ============================================================================== --- stable/9/sys/bsm/audit_errno.h Tue Dec 18 09:32:44 2012 (r244390) +++ stable/9/sys/bsm/audit_errno.h Tue Dec 18 10:23:58 2012 (r244391) @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_errno.h#5 + * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_errno.h#7 * $FreeBSD$ */ Modified: stable/9/sys/bsm/audit_internal.h ============================================================================== --- stable/9/sys/bsm/audit_internal.h Tue Dec 18 09:32:44 2012 (r244390) +++ stable/9/sys/bsm/audit_internal.h Tue Dec 18 10:23:58 2012 (r244391) @@ -15,7 +15,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -30,7 +30,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_internal.h#5 + * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_internal.h#6 * $FreeBSD$ */ Modified: stable/9/sys/bsm/audit_record.h ============================================================================== --- stable/9/sys/bsm/audit_record.h Tue Dec 18 09:32:44 2012 (r244390) +++ stable/9/sys/bsm/audit_record.h Tue Dec 18 10:23:58 2012 (r244391) @@ -234,6 +234,7 @@ token_t *au_to_ipc_perm(struct ipc_perm token_t *au_to_iport(uint16_t iport); token_t *au_to_opaque(const char *data, uint16_t bytes); token_t *au_to_path(const char *path); +token_t *au_to_privset(char *privtypestr, char *privstr); token_t *au_to_process(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_t *tid); token_t *au_to_process32(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, @@ -279,6 +280,7 @@ token_t *au_to_exec_env(char **envp); token_t *au_to_text(const char *text); token_t *au_to_kevent(struct kevent *kev); token_t *au_to_trailer(int rec_size); +token_t *au_to_upriv(char sorf, char *priv); token_t *au_to_zonename(const char *zonename); /* Modified: stable/9/sys/security/audit/audit_bsm_errno.c ============================================================================== --- stable/9/sys/security/audit/audit_bsm_errno.c Tue Dec 18 09:32:44 2012 (r244390) +++ stable/9/sys/security/audit/audit_bsm_errno.c Tue Dec 18 10:23:58 2012 (r244391) @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#18 + * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#22 */ #include @@ -494,7 +494,7 @@ static const struct bsm_errno bsm_errnos #ifdef EPROCUNAVAIL EPROCUNAVAIL, #else - ERRNO_NO_LOCAL_MAPPING + ERRNO_NO_LOCAL_MAPPING, #endif ES("Bad procedure for program") }, { BSM_ERRNO_EFTYPE, @@ -666,7 +666,7 @@ static const struct bsm_errno bsm_errnos #endif ES("Required key not available") }, { BSM_ERRNO_EKEYEXPIRED, -#ifdef EKEEXPIRED +#ifdef EKEYEXPIRED EKEYEXPIRED, #else ERRNO_NO_LOCAL_MAPPING, @@ -680,7 +680,7 @@ static const struct bsm_errno bsm_errnos #endif ES("Key has been revoked") }, { BSM_ERRNO_EKEYREJECTED, -#ifdef EKEREJECTED +#ifdef EKEYREJECTED EKEYREJECTED, #else ERRNO_NO_LOCAL_MAPPING, Modified: stable/9/sys/security/audit/audit_bsm_token.c ============================================================================== --- stable/9/sys/security/audit/audit_bsm_token.c Tue Dec 18 09:32:44 2012 (r244390) +++ stable/9/sys/security/audit/audit_bsm_token.c Tue Dec 18 10:23:58 2012 (r244391) @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#93 + * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#99 */ #include @@ -68,6 +68,57 @@ __FBSDID("$FreeBSD$"); /* * token ID 1 byte + * success/failure 1 byte + * privstrlen 2 bytes + * privstr N bytes + 1 (\0 byte) + */ +token_t * +au_to_upriv(char sorf, char *priv) +{ + u_int16_t textlen; + u_char *dptr; + token_t *t; + + textlen = strlen(priv) + 1; + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_char) + + sizeof(u_int16_t) + textlen); + + ADD_U_CHAR(dptr, AUT_UPRIV); + ADD_U_CHAR(dptr, sorf); + ADD_U_INT16(dptr, textlen); + ADD_STRING(dptr, priv, textlen); + return (t); +} + +/* + * token ID 1 byte + * privtstrlen 2 bytes + * privtstr N bytes + 1 + * privstrlen 2 bytes + * privstr N bytes + 1 + */ +token_t * +au_to_privset(char *privtypestr, char *privstr) +{ + u_int16_t type_len, priv_len; + u_char *dptr; + token_t *t; + + type_len = strlen(privtypestr) + 1; + priv_len = strlen(privstr) + 1; + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_int16_t) + + sizeof(u_int16_t) + type_len + priv_len); + + ADD_U_CHAR(dptr, AUT_PRIV); + ADD_U_INT16(dptr, type_len); + ADD_STRING(dptr, privtypestr, type_len); + ADD_U_INT16(dptr, priv_len); + ADD_STRING(dptr, privstr, priv_len); + return (t); +} + +/* + * token ID 1 byte * argument # 1 byte * argument value 4 bytes/8 bytes (32-bit/64-bit value) * text length 2 bytes @@ -1204,9 +1255,9 @@ au_to_me(void) auinfo.ai_asid, &auinfo.ai_termid)); } else { /* getaudit_addr(2) failed for some other reason. */ - return (NULL); + return (NULL); } - } + } return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(), getgid(), getpid(), aia.ai_asid, &aia.ai_termid)); @@ -1438,7 +1489,7 @@ au_to_header32_ex_tm(int rec_size, au_ev ADD_U_INT32(dptr, tm.tv_sec); ADD_U_INT32(dptr, timems); /* We need time in ms. */ - return (t); + return (t); } token_t * From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 10:29:29 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1238C332; Tue, 18 Dec 2012 10:29:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EA0448FC15; Tue, 18 Dec 2012 10:29:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIATSlg018325; Tue, 18 Dec 2012 10:29:28 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIATSC2018324; Tue, 18 Dec 2012 10:29:28 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212181029.qBIATSC2018324@svn.freebsd.org> From: Robert Watson Date: Tue, 18 Dec 2012 10:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244392 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 10:29:29 -0000 Author: rwatson Date: Tue Dec 18 10:29:28 2012 New Revision: 244392 URL: http://svnweb.freebsd.org/changeset/base/244392 Log: Merge r243798 from head to stable/9: Add auditdistd to the pre-install required uid check list. Modified: stable/9/Makefile.inc1 (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Dec 18 10:23:58 2012 (r244391) +++ stable/9/Makefile.inc1 Tue Dec 18 10:29:28 2012 (r244392) @@ -600,7 +600,7 @@ installcheck_DESTDIR: # # Check for missing UIDs/GIDs. # -CHECK_UIDS= +CHECK_UIDS= auditdistd CHECK_GIDS= audit .if ${MK_SENDMAIL} != "no" CHECK_UIDS+= smmsp From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 10:34:18 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA75B573; Tue, 18 Dec 2012 10:34:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9541C8FC14; Tue, 18 Dec 2012 10:34:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIAYIJc019206; Tue, 18 Dec 2012 10:34:18 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIAYIpN019205; Tue, 18 Dec 2012 10:34:18 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212181034.qBIAYIpN019205@svn.freebsd.org> From: Robert Watson Date: Tue, 18 Dec 2012 10:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244393 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 10:34:18 -0000 Author: rwatson Date: Tue Dec 18 10:34:18 2012 New Revision: 244393 URL: http://svnweb.freebsd.org/changeset/base/244393 Log: Merge r243800 from head to stable/9: Specifically point at the Handbook instructions for world updates in UPDATING by URL. As there has been some confusion over the need to run "mergemaster -p", part of our standard upgrade procedure, following the recent addition of an "auditdistd" user, add a note about it to UPDATING explicitly. Modified: stable/9/UPDATING (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/UPDATING ============================================================================== --- stable/9/UPDATING Tue Dec 18 10:29:28 2012 (r244392) +++ stable/9/UPDATING Tue Dec 18 10:34:18 2012 (r244393) @@ -4,11 +4,18 @@ This file is maintained and copyrighted See end of file for further details. For commonly done items, please see the COMMON ITEMS: section later in the file. These instructions assume that you basically know what you are doing. If not, then please consult the FreeBSD -handbook. +handbook: + + http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20121218: + With the addition of auditdistd(8), a new auditdistd user is now + depended on during installworld. "mergemaster -p" can be used to add + the user prior to installworld, as documented in the handbook. + 20121205: 9.1-RELEASE. From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 14:31:55 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA451A27; Tue, 18 Dec 2012 14:31:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ACECE8FC0C; Tue, 18 Dec 2012 14:31:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIEVtnN061902; Tue, 18 Dec 2012 14:31:55 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIEVtjI061901; Tue, 18 Dec 2012 14:31:55 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212181431.qBIEVtjI061901@svn.freebsd.org> From: Robert Watson Date: Tue, 18 Dec 2012 14:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244397 - stable/9/contrib/openbsm/bin/auditdistd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 14:31:55 -0000 Author: rwatson Date: Tue Dec 18 14:31:55 2012 New Revision: 244397 URL: http://svnweb.freebsd.org/changeset/base/244397 Log: Apply minor local adjustment to OpenBSM's parse.y due to differences in Yacc between 10-CURRENT and 9-STABLE; this will allow the soon-to-be-connected auditdistd to build on 9.x. Pointer from: bapt Modified: stable/9/contrib/openbsm/bin/auditdistd/parse.y Modified: stable/9/contrib/openbsm/bin/auditdistd/parse.y ============================================================================== --- stable/9/contrib/openbsm/bin/auditdistd/parse.y Tue Dec 18 12:28:00 2012 (r244396) +++ stable/9/contrib/openbsm/bin/auditdistd/parse.y Tue Dec 18 14:31:55 2012 (r244397) @@ -56,6 +56,7 @@ extern int lineno; extern FILE *yyin; extern char *yytext; +extern int yyparse(void); static struct adist_config *lconfig; static struct adist_host *curhost; From owner-svn-src-stable@FreeBSD.ORG Tue Dec 18 14:32:55 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B18ABBDB; Tue, 18 Dec 2012 14:32:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE3B8FC17; Tue, 18 Dec 2012 14:32:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIEWtjv062097; Tue, 18 Dec 2012 14:32:55 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBIEWs6A062091; Tue, 18 Dec 2012 14:32:54 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212181432.qBIEWs6A062091@svn.freebsd.org> From: Robert Watson Date: Tue, 18 Dec 2012 14:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244398 - in stable/9: etc/defaults etc/mtree etc/rc.d share/man/man4 usr.sbin usr.sbin/auditdistd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 14:32:55 -0000 Author: rwatson Date: Tue Dec 18 14:32:53 2012 New Revision: 244398 URL: http://svnweb.freebsd.org/changeset/base/244398 Log: Merge r244181 from head to stable/9: Fix the location of auditdistd configuration file. Reported by: Johan Hendriks Merge remaining unmerged portions of r243752 from head to stable/9; parts adding the new 'auditdistd' user were previously merged in r243947: Merge a number of changes required to hook up OpenBSM 1.2-alpha2's auditdistd (distributed audit daemon) to the build: - Manual cross references - Makefile for auditdistd - rc.d script, rc.conf entrie - New group and user for auditdistd; associated aliases, etc. The audit trail distribution daemon provides reliable, cryptographically protected (and sandboxed) delivery of audit tails from live clients to audit server hosts in order to both allow centralised analysis, and improve resilience in the event of client compromises: clients are not permitted to change trail contents after submission. Submitted by: pjd Sponsored by: The FreeBSD Foundation (auditdistd) Obtained from: TrustedBSD Project Added: stable/9/etc/rc.d/auditdistd - copied, changed from r243752, head/etc/rc.d/auditdistd stable/9/usr.sbin/auditdistd/ - copied from r243752, head/usr.sbin/auditdistd/ Modified: stable/9/etc/defaults/rc.conf stable/9/etc/mtree/BSD.var.dist stable/9/etc/rc.d/Makefile stable/9/share/man/man4/audit.4 stable/9/usr.sbin/Makefile Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/etc/defaults/rc.conf ============================================================================== --- stable/9/etc/defaults/rc.conf Tue Dec 18 14:31:55 2012 (r244397) +++ stable/9/etc/defaults/rc.conf Tue Dec 18 14:32:53 2012 (r244398) @@ -587,6 +587,9 @@ sendmail_rebuild_aliases="NO" # Run newa auditd_enable="NO" # Run the audit daemon. auditd_program="/usr/sbin/auditd" # Path to the audit daemon. auditd_flags="" # Which options to pass to the audit daemon. +auditdistd_enable="NO" # Run the audit daemon. +auditdistd_program="/usr/sbin/auditdistd" # Path to the auditdistd daemon. +auditdistd_flags="" # Which options to pass to the auditdistd daemon. cron_enable="YES" # Run the periodic job daemon. cron_program="/usr/sbin/cron" # Which cron executable to run (if enabled). cron_dst="YES" # Handle DST transitions intelligently (YES/NO) Modified: stable/9/etc/mtree/BSD.var.dist ============================================================================== --- stable/9/etc/mtree/BSD.var.dist Tue Dec 18 14:31:55 2012 (r244397) +++ stable/9/etc/mtree/BSD.var.dist Tue Dec 18 14:32:53 2012 (r244398) @@ -19,6 +19,10 @@ /set gname=audit audit .. + dist uname=auditdistd gname=audit mode=0770 + .. + remote uname=auditdistd gname=wheel mode=0700 + .. /set gname=wheel backups .. Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Tue Dec 18 14:31:55 2012 (r244397) +++ stable/9/etc/rc.d/Makefile Tue Dec 18 14:32:53 2012 (r244398) @@ -4,7 +4,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKING SERVERS \ abi accounting addswap adjkerntz amd \ - apm apmd archdep atm1 atm2 atm3 auditd \ + apm apmd archdep atm1 atm2 atm3 auditd auditdistd \ bgfsck bluetooth bootparams bridge bsnmpd bthidd \ ccd cleanvar cleartmp cron \ ddb defaultroute devd devfs dhclient \ Copied and modified: stable/9/etc/rc.d/auditdistd (from r243752, head/etc/rc.d/auditdistd) ============================================================================== --- head/etc/rc.d/auditdistd Sat Dec 1 15:11:46 2012 (r243752, copy source) +++ stable/9/etc/rc.d/auditdistd Tue Dec 18 14:32:53 2012 (r244398) @@ -14,7 +14,7 @@ name="auditdistd" rcvar="${name}_enable" pidfile="/var/run/${name}.pid" command="/usr/sbin/${name}" -required_files="/etc/${name}.conf" +required_files="/etc/security/${name}.conf" extra_commands="reload" load_rc_config $name Modified: stable/9/share/man/man4/audit.4 ============================================================================== --- stable/9/share/man/man4/audit.4 Tue Dec 18 14:31:55 2012 (r244397) +++ stable/9/share/man/man4/audit.4 Tue Dec 18 14:32:53 2012 (r244398) @@ -96,7 +96,8 @@ to track users and events in a fine-grai .Xr audit_warn 5 , .Xr rc.conf 5 , .Xr audit 8 , -.Xr auditd 8 +.Xr auditd 8 , +.Xr auditdistd 8 .Sh HISTORY The .Tn OpenBSM Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Tue Dec 18 14:31:55 2012 (r244397) +++ stable/9/usr.sbin/Makefile Tue Dec 18 14:32:53 2012 (r244398) @@ -109,6 +109,9 @@ SUBDIR+= amd .if ${MK_AUDIT} != "no" SUBDIR+= audit SUBDIR+= auditd +.if ${MK_OPENSSL} != "no" +SUBDIR+= auditdistd +.endif SUBDIR+= auditreduce SUBDIR+= praudit .endif From owner-svn-src-stable@FreeBSD.ORG Wed Dec 19 04:24:11 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E06E0A7D; Wed, 19 Dec 2012 04:24:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C5BB38FC13; Wed, 19 Dec 2012 04:24:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJ4OB04007868; Wed, 19 Dec 2012 04:24:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJ4OBVZ007867; Wed, 19 Dec 2012 04:24:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201212190424.qBJ4OBVZ007867@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 19 Dec 2012 04:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244416 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 04:24:12 -0000 Author: kib Date: Wed Dec 19 04:24:11 2012 New Revision: 244416 URL: http://svnweb.freebsd.org/changeset/base/244416 Log: MFC r243901: Fixes to ensure the integrity of the callwheel tailqs. MFC r243912 (by attilio): Rearrange comments, use cached callout flags when callout could have been already destroyed. Modified: stable/9/sys/kern/kern_timeout.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_timeout.c ============================================================================== --- stable/9/sys/kern/kern_timeout.c Wed Dec 19 04:18:21 2012 (r244415) +++ stable/9/sys/kern/kern_timeout.c Wed Dec 19 04:24:11 2012 (r244416) @@ -441,15 +441,13 @@ static void callout_cc_del(struct callout *c, struct callout_cpu *cc) { - if (cc->cc_next == c) - cc->cc_next = TAILQ_NEXT(c, c_links.tqe); - if (c->c_flags & CALLOUT_LOCAL_ALLOC) { - c->c_func = NULL; - SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle); - } + if ((c->c_flags & CALLOUT_LOCAL_ALLOC) == 0) + return; + c->c_func = NULL; + SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle); } -static struct callout * +static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, int *mpcalls, int *lockcalls, int *gcalls) { @@ -471,7 +469,9 @@ softclock_call_cc(struct callout *c, str static timeout_t *lastfunc; #endif - cc->cc_next = TAILQ_NEXT(c, c_links.tqe); + KASSERT((c->c_flags & (CALLOUT_PENDING | CALLOUT_ACTIVE)) == + (CALLOUT_PENDING | CALLOUT_ACTIVE), + ("softclock_call_cc: pend|act %p %x", c, c->c_flags)); class = (c->c_lock != NULL) ? LOCK_CLASS(c->c_lock) : NULL; sharedlock = (c->c_flags & CALLOUT_SHAREDLOCK) ? 0 : 1; c_lock = c->c_lock; @@ -539,20 +539,7 @@ softclock_call_cc(struct callout *c, str class->lc_unlock(c_lock); skip: CC_LOCK(cc); - /* - * If the current callout is locally allocated (from - * timeout(9)) then put it on the freelist. - * - * Note: we need to check the cached copy of c_flags because - * if it was not local, then it's not safe to deref the - * callout pointer. - */ - if (c_flags & CALLOUT_LOCAL_ALLOC) { - KASSERT(c->c_flags == CALLOUT_LOCAL_ALLOC, - ("corrupted callout")); - c->c_func = NULL; - SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle); - } + KASSERT(cc->cc_curr == c, ("mishandled cc_curr")); cc->cc_curr = NULL; if (cc->cc_waiting) { /* @@ -561,13 +548,22 @@ skip: * If the callout was scheduled for * migration just cancel it. */ - if (cc_cme_migrating(cc)) + if (cc_cme_migrating(cc)) { cc_cme_cleanup(cc); + + /* + * It should be assert here that the callout is not + * destroyed but that is not easy. + */ + c->c_flags &= ~CALLOUT_DFRMIGRATION; + } cc->cc_waiting = 0; CC_UNLOCK(cc); wakeup(&cc->cc_waiting); CC_LOCK(cc); } else if (cc_cme_migrating(cc)) { + KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0, + ("Migrating legacy callout %p", c)); #ifdef SMP /* * If the callout was scheduled for @@ -580,23 +576,20 @@ skip: cc_cme_cleanup(cc); /* - * Handle deferred callout stops + * It should be assert here that the callout is not destroyed + * but that is not easy. + * + * As first thing, handle deferred callout stops. */ if ((c->c_flags & CALLOUT_DFRMIGRATION) == 0) { CTR3(KTR_CALLOUT, "deferred cancelled %p func %p arg %p", c, new_func, new_arg); callout_cc_del(c, cc); - goto nextc; + return; } - c->c_flags &= ~CALLOUT_DFRMIGRATION; - /* - * It should be assert here that the - * callout is not destroyed but that - * is not easy. - */ new_cc = callout_cpu_switch(c, cc, new_cpu); callout_cc_add(c, new_cc, new_ticks, new_func, new_arg, new_cpu); @@ -606,10 +599,19 @@ skip: panic("migration should not happen"); #endif } -#ifdef SMP -nextc: -#endif - return (cc->cc_next); + /* + * If the current callout is locally allocated (from + * timeout(9)) then put it on the freelist. + * + * Note: we need to check the cached copy of c_flags because + * if it was not local, then it's not safe to deref the + * callout pointer. + */ + KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0 || + c->c_flags == CALLOUT_LOCAL_ALLOC, + ("corrupted callout")); + if (c_flags & CALLOUT_LOCAL_ALLOC) + callout_cc_del(c, cc); } /* @@ -676,10 +678,12 @@ softclock(void *arg) steps = 0; } } else { + cc->cc_next = TAILQ_NEXT(c, c_links.tqe); TAILQ_REMOVE(bucket, c, c_links.tqe); - c = softclock_call_cc(c, cc, &mpcalls, + softclock_call_cc(c, cc, &mpcalls, &lockcalls, &gcalls); steps = 0; + c = cc->cc_next; } } } @@ -1024,6 +1028,8 @@ again: CTR3(KTR_CALLOUT, "cancelled %p func %p arg %p", c, c->c_func, c->c_arg); + if (cc->cc_next == c) + cc->cc_next = TAILQ_NEXT(c, c_links.tqe); TAILQ_REMOVE(&cc->cc_callwheel[c->c_time & callwheelmask], c, c_links.tqe); callout_cc_del(c, cc); From owner-svn-src-stable@FreeBSD.ORG Wed Dec 19 12:19:45 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA703609; Wed, 19 Dec 2012 12:19:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9EAE18FC13; Wed, 19 Dec 2012 12:19:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJCJjkk091452; Wed, 19 Dec 2012 12:19:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJCJjgc091451; Wed, 19 Dec 2012 12:19:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212191219.qBJCJjgc091451@svn.freebsd.org> From: Dimitry Andric Date: Wed, 19 Dec 2012 12:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244430 - stable/9/sbin/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 12:19:45 -0000 Author: dim Date: Wed Dec 19 12:19:45 2012 New Revision: 244430 URL: http://svnweb.freebsd.org/changeset/base/244430 Log: MFC r243907: Fix an old bug in devd, where it uses std::sort() to sort the various lists it reads from its configuration files on the priority field. Because some items in the lists have the same priority, and std::sort() is not stable, the exact order in which the items are enumerated does not have to correspond to the order they appear in the configuration files. Apparently this was never noticed with libstdc++, but with libc++ it could cause the "uhid" entry from /etc/devd/usb.conf to be used instead of the "ums" entry (which is earlier in the file). This caused the problem described in the PR: the USB mouse module was never loaded, and the other actions (such as starting moused) were not executed. To fix the problem, make devd use std:stable_sort() instead. Reported by: Jan Beich PR: bin/172958 Modified: stable/9/sbin/devd/devd.cc Directory Properties: stable/9/sbin/devd/ (props changed) Modified: stable/9/sbin/devd/devd.cc ============================================================================== --- stable/9/sbin/devd/devd.cc Wed Dec 19 12:14:08 2012 (r244429) +++ stable/9/sbin/devd/devd.cc Wed Dec 19 12:19:45 2012 (r244430) @@ -436,7 +436,7 @@ public: void config::sort_vector(vector &v) { - sort(v.begin(), v.end(), epv_greater()); + stable_sort(v.begin(), v.end(), epv_greater()); } void From owner-svn-src-stable@FreeBSD.ORG Wed Dec 19 12:19:57 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98EED761; Wed, 19 Dec 2012 12:19:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6CE8FC15; Wed, 19 Dec 2012 12:19:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJCJvwI091522; Wed, 19 Dec 2012 12:19:57 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJCJvrO091521; Wed, 19 Dec 2012 12:19:57 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212191219.qBJCJvrO091521@svn.freebsd.org> From: Dimitry Andric Date: Wed, 19 Dec 2012 12:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244431 - stable/8/sbin/devd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 12:19:57 -0000 Author: dim Date: Wed Dec 19 12:19:56 2012 New Revision: 244431 URL: http://svnweb.freebsd.org/changeset/base/244431 Log: MFC r243907: Fix an old bug in devd, where it uses std::sort() to sort the various lists it reads from its configuration files on the priority field. Because some items in the lists have the same priority, and std::sort() is not stable, the exact order in which the items are enumerated does not have to correspond to the order they appear in the configuration files. Apparently this was never noticed with libstdc++, but with libc++ it could cause the "uhid" entry from /etc/devd/usb.conf to be used instead of the "ums" entry (which is earlier in the file). This caused the problem described in the PR: the USB mouse module was never loaded, and the other actions (such as starting moused) were not executed. To fix the problem, make devd use std:stable_sort() instead. Reported by: Jan Beich PR: bin/172958 Modified: stable/8/sbin/devd/devd.cc Directory Properties: stable/8/sbin/devd/ (props changed) Modified: stable/8/sbin/devd/devd.cc ============================================================================== --- stable/8/sbin/devd/devd.cc Wed Dec 19 12:19:45 2012 (r244430) +++ stable/8/sbin/devd/devd.cc Wed Dec 19 12:19:56 2012 (r244431) @@ -352,7 +352,7 @@ public: void config::sort_vector(vector &v) { - sort(v.begin(), v.end(), epv_greater()); + stable_sort(v.begin(), v.end(), epv_greater()); } void From owner-svn-src-stable@FreeBSD.ORG Wed Dec 19 12:20:05 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98B5386E; Wed, 19 Dec 2012 12:20:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E54C48FC0A; Wed, 19 Dec 2012 12:20:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJCK4El091602; Wed, 19 Dec 2012 12:20:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJCK49p091601; Wed, 19 Dec 2012 12:20:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212191220.qBJCK49p091601@svn.freebsd.org> From: Dimitry Andric Date: Wed, 19 Dec 2012 12:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244432 - stable/7/sbin/devd X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 12:20:05 -0000 Author: dim Date: Wed Dec 19 12:20:04 2012 New Revision: 244432 URL: http://svnweb.freebsd.org/changeset/base/244432 Log: MFC r243907: Fix an old bug in devd, where it uses std::sort() to sort the various lists it reads from its configuration files on the priority field. Because some items in the lists have the same priority, and std::sort() is not stable, the exact order in which the items are enumerated does not have to correspond to the order they appear in the configuration files. Apparently this was never noticed with libstdc++, but with libc++ it could cause the "uhid" entry from /etc/devd/usb.conf to be used instead of the "ums" entry (which is earlier in the file). This caused the problem described in the PR: the USB mouse module was never loaded, and the other actions (such as starting moused) were not executed. To fix the problem, make devd use std:stable_sort() instead. Reported by: Jan Beich PR: bin/172958 Modified: stable/7/sbin/devd/devd.cc Directory Properties: stable/7/sbin/devd/ (props changed) Modified: stable/7/sbin/devd/devd.cc ============================================================================== --- stable/7/sbin/devd/devd.cc Wed Dec 19 12:19:56 2012 (r244431) +++ stable/7/sbin/devd/devd.cc Wed Dec 19 12:20:04 2012 (r244432) @@ -351,7 +351,7 @@ public: void config::sort_vector(vector &v) { - sort(v.begin(), v.end(), epv_greater()); + stable_sort(v.begin(), v.end(), epv_greater()); } void From owner-svn-src-stable@FreeBSD.ORG Wed Dec 19 16:22:48 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07B19C1F; Wed, 19 Dec 2012 16:22:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E124A8FC13; Wed, 19 Dec 2012 16:22:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBJGMlTw035380; Wed, 19 Dec 2012 16:22:47 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBJGMk1e035370; Wed, 19 Dec 2012 16:22:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201212191622.qBJGMk1e035370@svn.freebsd.org> From: Dimitry Andric Date: Wed, 19 Dec 2012 16:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244436 - stable/9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 16:22:48 -0000 Author: dim Date: Wed Dec 19 16:22:46 2012 New Revision: 244436 URL: http://svnweb.freebsd.org/changeset/base/244436 Log: MFC r243572: Pull in r168610 from upstream libc++: When using libc++ headers on FreeBSD, in combination with -std=c++98, -ansi or -std=c++03, the long long type is not supported. So in this case, several functions and types, like lldiv_t, strtoll(), are not declared. This should make it possible to use the libc++ headers in c++98 mode. Note: libc++ is originally designed as a c++0x or higher library, so you should still take care when using it with c++98 or c++03. Noted by: Yamaya Takashi MFC r243673 (by theraven): Merge new libc++ into head. Modified: stable/9/contrib/libc++/include/__config stable/9/contrib/libc++/include/cstdlib stable/9/contrib/libc++/include/cwchar stable/9/contrib/libc++/include/exception stable/9/contrib/libc++/include/iterator stable/9/contrib/libc++/include/locale Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/9/contrib/libc++/include/__config ============================================================================== --- stable/9/contrib/libc++/include/__config Wed Dec 19 13:26:46 2012 (r244435) +++ stable/9/contrib/libc++/include/__config Wed Dec 19 16:22:46 2012 (r244436) @@ -51,6 +51,9 @@ # define _LIBCPP_LITTLE_ENDIAN 0 # define _LIBCPP_BIG_ENDIAN 1 # endif // _BYTE_ORDER == _LITTLE_ENDIAN +# ifndef __LONG_LONG_SUPPORTED +# define _LIBCPP_HAS_NO_LONG_LONG +# endif // __LONG_LONG_SUPPORTED #endif // __FreeBSD__ #ifdef _WIN32 Modified: stable/9/contrib/libc++/include/cstdlib ============================================================================== --- stable/9/contrib/libc++/include/cstdlib Wed Dec 19 13:26:46 2012 (r244435) +++ stable/9/contrib/libc++/include/cstdlib Wed Dec 19 16:22:46 2012 (r244436) @@ -97,18 +97,26 @@ _LIBCPP_BEGIN_NAMESPACE_STD using ::size_t; using ::div_t; using ::ldiv_t; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::lldiv_t; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::atof; using ::atoi; using ::atol; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::atoll; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::strtod; using ::strtof; using ::strtold; using ::strtol; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::strtoll; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::strtoul; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::strtoull; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::rand; using ::srand; using ::calloc; @@ -125,10 +133,14 @@ using ::bsearch; using ::qsort; using ::abs; using ::labs; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::llabs; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::div; using ::ldiv; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::lldiv; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::mblen; using ::mbtowc; using ::wctomb; @@ -145,10 +157,14 @@ using ::aligned_alloc; // MSVC already has the correct prototype in #ifdef __cplusplus #if !defined(_MSC_VER) && !defined(__sun__) inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);} +#ifndef _LIBCPP_HAS_NO_LONG_LONG inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);} +#endif // _LIBCPP_HAS_NO_LONG_LONG inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);} +#ifndef _LIBCPP_HAS_NO_LONG_LONG inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);} +#endif // _LIBCPP_HAS_NO_LONG_LONG #endif // _MSC_VER _LIBCPP_END_NAMESPACE_STD Modified: stable/9/contrib/libc++/include/cwchar ============================================================================== --- stable/9/contrib/libc++/include/cwchar Wed Dec 19 13:26:46 2012 (r244435) +++ stable/9/contrib/libc++/include/cwchar Wed Dec 19 16:22:46 2012 (r244436) @@ -151,9 +151,13 @@ using ::wcstof; using ::wcstold; #endif // _MSC_VER using ::wcstol; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::wcstoll; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::wcstoul; +#ifndef _LIBCPP_HAS_NO_LONG_LONG using ::wcstoull; +#endif // _LIBCPP_HAS_NO_LONG_LONG using ::wcscpy; using ::wcsncpy; using ::wcscat; Modified: stable/9/contrib/libc++/include/exception ============================================================================== --- stable/9/contrib/libc++/include/exception Wed Dec 19 13:26:46 2012 (r244435) +++ stable/9/contrib/libc++/include/exception Wed Dec 19 16:22:46 2012 (r244436) @@ -143,7 +143,7 @@ public: {return !(__x == __y);} friend exception_ptr current_exception() _NOEXCEPT; - _LIBCPP_NORETURN friend void rethrow_exception(exception_ptr); + friend void rethrow_exception(exception_ptr); }; template Modified: stable/9/contrib/libc++/include/iterator ============================================================================== --- stable/9/contrib/libc++/include/iterator Wed Dec 19 13:26:46 2012 (r244435) +++ stable/9/contrib/libc++/include/iterator Wed Dec 19 16:22:46 2012 (r244436) @@ -317,6 +317,10 @@ template T* end(T (& #include #include #include +#if __APPLE__ +#include +#endif + #ifdef _LIBCPP_DEBUG #include #endif @@ -795,7 +799,7 @@ public: typedef basic_streambuf<_CharT,_Traits> streambuf_type; typedef basic_istream<_CharT,_Traits> istream_type; private: - streambuf_type* __sbuf_; + mutable streambuf_type* __sbuf_; class __proxy { @@ -809,13 +813,14 @@ private: }; _LIBCPP_INLINE_VISIBILITY - void __test_for_eof() + bool __test_for_eof() const { if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof())) __sbuf_ = 0; + return __sbuf_ == 0; } public: - _LIBCPP_INLINE_VISIBILITY istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {__test_for_eof();} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT @@ -828,19 +833,16 @@ public: _LIBCPP_INLINE_VISIBILITY char_type* operator->() const {return nullptr;} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator& operator++() { - if (traits_type::eq_int_type(__sbuf_->snextc(), traits_type::eof())) - __sbuf_ = 0; + __sbuf_->sbumpc(); return *this; } _LIBCPP_INLINE_VISIBILITY __proxy operator++(int) { - char_type __c = __sbuf_->sgetc(); - ++(*this); - return __proxy(__c, __sbuf_); + return __proxy(__sbuf_->sbumpc(), __sbuf_); } _LIBCPP_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const - {return (__sbuf_ == 0) == (__b.__sbuf_ == 0);} + {return __test_for_eof() == __b.__test_for_eof();} }; template @@ -882,6 +884,10 @@ public: _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;} _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;} +#if !defined(__APPLE__) || \ + (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \ + (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0) + template friend _LIBCPP_HIDDEN @@ -889,6 +895,7 @@ public: __pad_and_output(ostreambuf_iterator<_Ch, _Tr> __s, const _Ch* __ob, const _Ch* __op, const _Ch* __oe, ios_base& __iob, _Ch __fl); +#endif }; template Modified: stable/9/contrib/libc++/include/locale ============================================================================== --- stable/9/contrib/libc++/include/locale Wed Dec 19 13:26:46 2012 (r244435) +++ stable/9/contrib/libc++/include/locale Wed Dec 19 16:22:46 2012 (r244436) @@ -192,6 +192,10 @@ template class messages_by #include #endif // !_WIN32 +#if __APPLE__ +#include +#endif + #include <__undef_min_max> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -1587,6 +1591,10 @@ __pad_and_output(_OutputIterator __s, return __s; } +#if !defined(__APPLE__) || \ + (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \ + (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0) + template _LIBCPP_HIDDEN ostreambuf_iterator<_CharT, _Traits> @@ -1633,6 +1641,8 @@ __pad_and_output(ostreambuf_iterator<_Ch return __s; } +#endif + template _OutputIterator num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob, From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:26:47 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81452284; Thu, 20 Dec 2012 00:26:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6398FC12; Thu, 20 Dec 2012 00:26:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0QloY020835; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0QlDJ020829; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200026.qBK0QlDJ020829@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244454 - stable/9/usr.sbin/mergemaster X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:26:47 -0000 Author: eadler Date: Thu Dec 20 00:26:46 2012 New Revision: 244454 URL: http://svnweb.freebsd.org/changeset/base/244454 Log: MFC r243892: Remove pointless check for the existence of /usr/bin/less which exists in all configurations. Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/mergemaster/ (props changed) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/9/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:06:24 2012 (r244453) +++ stable/9/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:46 2012 (r244454) @@ -421,9 +421,7 @@ check_pager () { echo " I cannot execute it. So, what would you like to do?" echo '' echo " Use 'e' to exit mergemaster and fix your PAGER variable" - if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then echo " Use 'l' to set PAGER to 'less' for this run" - fi echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' echo " Default is to use plain old 'more' " @@ -436,17 +434,7 @@ check_pager () { exit 0 ;; [lL]) - if [ -x /usr/bin/less ]; then - PAGER=/usr/bin/less - elif [ -x /usr/local/bin/less ]; then - PAGER=/usr/local/bin/less - else - echo '' - echo " *** Fatal Error:" - echo " You asked to use 'less' as your pager, but I can't" - echo " find it in /usr/bin or /usr/local/bin" - exit 1 - fi + PAGER=less ;; [mM]|'') PAGER=more From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:26:47 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEFAC285; Thu, 20 Dec 2012 00:26:47 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8902B8FC13; Thu, 20 Dec 2012 00:26:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0QlSb020848; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0QlrV020842; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200026.qBK0QlrV020842@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244455 - stable/8/usr.sbin/mergemaster X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:26:47 -0000 Author: eadler Date: Thu Dec 20 00:26:46 2012 New Revision: 244455 URL: http://svnweb.freebsd.org/changeset/base/244455 Log: MFC r243892: Remove pointless check for the existence of /usr/bin/less which exists in all configurations. Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/ (props changed) stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:46 2012 (r244454) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:46 2012 (r244455) @@ -421,9 +421,7 @@ check_pager () { echo " I cannot execute it. So, what would you like to do?" echo '' echo " Use 'e' to exit mergemaster and fix your PAGER variable" - if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then echo " Use 'l' to set PAGER to 'less' for this run" - fi echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' echo " Default is to use plain old 'more' " @@ -436,17 +434,7 @@ check_pager () { exit 0 ;; [lL]) - if [ -x /usr/bin/less ]; then - PAGER=/usr/bin/less - elif [ -x /usr/local/bin/less ]; then - PAGER=/usr/local/bin/less - else - echo '' - echo " *** Fatal Error:" - echo " You asked to use 'less' as your pager, but I can't" - echo " find it in /usr/bin or /usr/local/bin" - exit 1 - fi + PAGER=less ;; [mM]|'') PAGER=more From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:26:48 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36D62286; Thu, 20 Dec 2012 00:26:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 013A38FC14; Thu, 20 Dec 2012 00:26:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Qlqa020857; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Qld5020856; Thu, 20 Dec 2012 00:26:47 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200026.qBK0Qld5020856@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244456 - stable/7/usr.sbin/mergemaster X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:26:48 -0000 Author: eadler Date: Thu Dec 20 00:26:47 2012 New Revision: 244456 URL: http://svnweb.freebsd.org/changeset/base/244456 Log: MFC r243892: Remove pointless check for the existence of /usr/bin/less which exists in all configurations. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/ (props changed) stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:46 2012 (r244455) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:26:47 2012 (r244456) @@ -421,9 +421,7 @@ check_pager () { echo " I cannot execute it. So, what would you like to do?" echo '' echo " Use 'e' to exit mergemaster and fix your PAGER variable" - if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then echo " Use 'l' to set PAGER to 'less' for this run" - fi echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' echo " Default is to use plain old 'more' " @@ -436,17 +434,7 @@ check_pager () { exit 0 ;; [lL]) - if [ -x /usr/bin/less ]; then - PAGER=/usr/bin/less - elif [ -x /usr/local/bin/less ]; then - PAGER=/usr/local/bin/less - else - echo '' - echo " *** Fatal Error:" - echo " You asked to use 'less' as your pager, but I can't" - echo " find it in /usr/bin or /usr/local/bin" - exit 1 - fi + PAGER=less ;; [mM]|'') PAGER=more From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:28:52 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88D637E6; Thu, 20 Dec 2012 00:28:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4EC8FC0A; Thu, 20 Dec 2012 00:28:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Sq6N021270; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Sq6t021260; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200028.qBK0Sq6t021260@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244457 - stable/8/usr.sbin/pw X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:28:52 -0000 Author: eadler Date: Thu Dec 20 00:28:51 2012 New Revision: 244457 URL: http://svnweb.freebsd.org/changeset/base/244457 Log: MFC r243894: Remove useless check for NULL prior to free. Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/pw/bitmap.c stable/8/usr.sbin/pw/pw_group.c Directory Properties: stable/8/usr.sbin/pw/ (props changed) Modified: stable/8/usr.sbin/pw/bitmap.c ============================================================================== --- stable/8/usr.sbin/pw/bitmap.c Thu Dec 20 00:26:47 2012 (r244456) +++ stable/8/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:51 2012 (r244457) @@ -50,8 +50,7 @@ bm_alloc(int size) void bm_dealloc(struct bitmap * bm) { - if (bm->map) - free(bm->map); + free(bm->map); } static void Modified: stable/8/usr.sbin/pw/pw_group.c ============================================================================== --- stable/8/usr.sbin/pw/pw_group.c Thu Dec 20 00:26:47 2012 (r244456) +++ stable/8/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:51 2012 (r244457) @@ -272,8 +272,7 @@ pw_group(struct userconf * cnf, int mode pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid); - if (members) - free(members); + free(members); return EXIT_SUCCESS; } From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:28:52 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 960CE7E7; Thu, 20 Dec 2012 00:28:52 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79DC08FC0C; Thu, 20 Dec 2012 00:28:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0SqBU021272; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0SqZh021262; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200028.qBK0SqZh021262@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244458 - stable/7/usr.sbin/pw X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:28:52 -0000 Author: eadler Date: Thu Dec 20 00:28:51 2012 New Revision: 244458 URL: http://svnweb.freebsd.org/changeset/base/244458 Log: MFC r243894: Remove useless check for NULL prior to free. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/pw/bitmap.c stable/7/usr.sbin/pw/pw_group.c Directory Properties: stable/7/usr.sbin/pw/ (props changed) Modified: stable/7/usr.sbin/pw/bitmap.c ============================================================================== --- stable/7/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:51 2012 (r244457) +++ stable/7/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:51 2012 (r244458) @@ -50,8 +50,7 @@ bm_alloc(int size) void bm_dealloc(struct bitmap * bm) { - if (bm->map) - free(bm->map); + free(bm->map); } static void Modified: stable/7/usr.sbin/pw/pw_group.c ============================================================================== --- stable/7/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:51 2012 (r244457) +++ stable/7/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:51 2012 (r244458) @@ -272,8 +272,7 @@ pw_group(struct userconf * cnf, int mode pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid); - if (members) - free(members); + free(members); return EXIT_SUCCESS; } From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:28:53 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B1E27E8; Thu, 20 Dec 2012 00:28:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 306B98FC13; Thu, 20 Dec 2012 00:28:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0SrTV021289; Thu, 20 Dec 2012 00:28:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0SqUp021287; Thu, 20 Dec 2012 00:28:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200028.qBK0SqUp021287@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244459 - stable/9/usr.sbin/pw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:28:53 -0000 Author: eadler Date: Thu Dec 20 00:28:52 2012 New Revision: 244459 URL: http://svnweb.freebsd.org/changeset/base/244459 Log: MFC r243894: Remove useless check for NULL prior to free. Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/pw/bitmap.c stable/9/usr.sbin/pw/pw_group.c Directory Properties: stable/9/usr.sbin/pw/ (props changed) Modified: stable/9/usr.sbin/pw/bitmap.c ============================================================================== --- stable/9/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:51 2012 (r244458) +++ stable/9/usr.sbin/pw/bitmap.c Thu Dec 20 00:28:52 2012 (r244459) @@ -50,8 +50,7 @@ bm_alloc(int size) void bm_dealloc(struct bitmap * bm) { - if (bm->map) - free(bm->map); + free(bm->map); } static void Modified: stable/9/usr.sbin/pw/pw_group.c ============================================================================== --- stable/9/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:51 2012 (r244458) +++ stable/9/usr.sbin/pw/pw_group.c Thu Dec 20 00:28:52 2012 (r244459) @@ -272,8 +272,7 @@ pw_group(struct userconf * cnf, int mode pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid); - if (members) - free(members); + free(members); return EXIT_SUCCESS; } From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:30:48 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8F20C36; Thu, 20 Dec 2012 00:30:48 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BD8958FC14; Thu, 20 Dec 2012 00:30:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0UmfB021755; Thu, 20 Dec 2012 00:30:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0UmWg021753; Thu, 20 Dec 2012 00:30:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200030.qBK0UmWg021753@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244460 - stable/8/usr.sbin/mergemaster X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:30:48 -0000 Author: eadler Date: Thu Dec 20 00:30:48 2012 New Revision: 244460 URL: http://svnweb.freebsd.org/changeset/base/244460 Log: MFC r243891: Add ability to mergemaster to permit the user to type the absolute path to PAGER if mergemaster can not find the one already set. Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/8/usr.sbin/mergemaster/ (props changed) Modified: stable/8/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/8/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:28:52 2012 (r244459) +++ stable/8/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244460) @@ -424,6 +424,8 @@ check_pager () { echo " Use 'l' to set PAGER to 'less' for this run" echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' + echo " or you may type an absolute path to PAGER for this run" + echo '' echo " Default is to use plain old 'more' " echo '' echo -n "What should I do? [Use 'more'] " @@ -439,6 +441,9 @@ check_pager () { [mM]|'') PAGER=more ;; + /*) + PAGER="$FIXPAGER" + ;; *) echo '' echo "invalid choice: ${FIXPAGER}" From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:30:49 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14E54C37; Thu, 20 Dec 2012 00:30:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ED50F8FC16; Thu, 20 Dec 2012 00:30:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Um54021761; Thu, 20 Dec 2012 00:30:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0UmYA021760; Thu, 20 Dec 2012 00:30:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200030.qBK0UmYA021760@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244461 - stable/9/usr.sbin/mergemaster X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:30:49 -0000 Author: eadler Date: Thu Dec 20 00:30:48 2012 New Revision: 244461 URL: http://svnweb.freebsd.org/changeset/base/244461 Log: MFC r243891: Add ability to mergemaster to permit the user to type the absolute path to PAGER if mergemaster can not find the one already set. Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/9/usr.sbin/mergemaster/ (props changed) Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/9/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244460) +++ stable/9/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244461) @@ -424,6 +424,8 @@ check_pager () { echo " Use 'l' to set PAGER to 'less' for this run" echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' + echo " or you may type an absolute path to PAGER for this run" + echo '' echo " Default is to use plain old 'more' " echo '' echo -n "What should I do? [Use 'more'] " @@ -439,6 +441,9 @@ check_pager () { [mM]|'') PAGER=more ;; + /*) + PAGER="$FIXPAGER" + ;; *) echo '' echo "invalid choice: ${FIXPAGER}" From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:30:49 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A36FC38; Thu, 20 Dec 2012 00:30:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC888FC17; Thu, 20 Dec 2012 00:30:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Unpc021765; Thu, 20 Dec 2012 00:30:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0UmQY021764; Thu, 20 Dec 2012 00:30:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200030.qBK0UmQY021764@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244462 - stable/7/usr.sbin/mergemaster X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:30:49 -0000 Author: eadler Date: Thu Dec 20 00:30:48 2012 New Revision: 244462 URL: http://svnweb.freebsd.org/changeset/base/244462 Log: MFC r243891: Add ability to mergemaster to permit the user to type the absolute path to PAGER if mergemaster can not find the one already set. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/7/usr.sbin/mergemaster/ (props changed) Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244461) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Thu Dec 20 00:30:48 2012 (r244462) @@ -424,6 +424,8 @@ check_pager () { echo " Use 'l' to set PAGER to 'less' for this run" echo " Use 'm' to use plain old 'more' as your PAGER for this run" echo '' + echo " or you may type an absolute path to PAGER for this run" + echo '' echo " Default is to use plain old 'more' " echo '' echo -n "What should I do? [Use 'more'] " @@ -439,6 +441,9 @@ check_pager () { [mM]|'') PAGER=more ;; + /*) + PAGER="$FIXPAGER" + ;; *) echo '' echo "invalid choice: ${FIXPAGER}" From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:32:44 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69846109; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED9D8FC0C; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Winl022171; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Whoi022165; Thu, 20 Dec 2012 00:32:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200032.qBK0Whoi022165@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244463 - in stable/8: sbin/setkey usr.sbin/ndp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:32:44 -0000 Author: eadler Date: Thu Dec 20 00:32:43 2012 New Revision: 244463 URL: http://svnweb.freebsd.org/changeset/base/244463 Log: MFC r244318: Minor wording improvments to some manual pages Approved by: cperciva (implicit) Modified: stable/8/sbin/setkey/setkey.8 stable/8/usr.sbin/ndp/ndp.8 Directory Properties: stable/8/sbin/setkey/ (props changed) stable/8/usr.sbin/ndp/ (props changed) Modified: stable/8/sbin/setkey/setkey.8 ============================================================================== --- stable/8/sbin/setkey/setkey.8 Thu Dec 20 00:30:48 2012 (r244462) +++ stable/8/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244463) @@ -110,7 +110,7 @@ Loop forever and dump all the messages t .Dv PF_KEY socket. .Fl xx -makes each timestamps unformatted. +makes each timestamp unformatted. .El .Ss Configuration syntax With Modified: stable/8/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/8/usr.sbin/ndp/ndp.8 Thu Dec 20 00:30:48 2012 (r244462) +++ stable/8/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244463) @@ -236,8 +236,8 @@ responding to requests for .Ar hostname even though the host address is not its own. .It Fl t -Print timestamp on each entry, -making it possible to merge output with +Print timestamp for each entry, +to make it possible to merge the output with .Xr tcpdump 1 . Most useful when used with .Fl A . From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:32:44 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B97810A; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0EE8FC12; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Wihi022176; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Wi37022167; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200032.qBK0Wi37022167@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244464 - in stable/9: sbin/setkey usr.sbin/ndp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:32:44 -0000 Author: eadler Date: Thu Dec 20 00:32:43 2012 New Revision: 244464 URL: http://svnweb.freebsd.org/changeset/base/244464 Log: MFC r244318: Minor wording improvments to some manual pages Approved by: cperciva (implicit) Modified: stable/9/sbin/setkey/setkey.8 stable/9/usr.sbin/ndp/ndp.8 Directory Properties: stable/9/sbin/setkey/ (props changed) stable/9/usr.sbin/ndp/ (props changed) Modified: stable/9/sbin/setkey/setkey.8 ============================================================================== --- stable/9/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244463) +++ stable/9/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244464) @@ -110,7 +110,7 @@ Loop forever and dump all the messages t .Dv PF_KEY socket. .Fl xx -makes each timestamps unformatted. +makes each timestamp unformatted. .El .Ss Configuration syntax With Modified: stable/9/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/9/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244463) +++ stable/9/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244464) @@ -240,8 +240,8 @@ responding to requests for .Ar hostname even though the host address is not its own. .It Fl t -Print timestamp on each entry, -making it possible to merge output with +Print timestamp for each entry, +to make it possible to merge the output with .Xr tcpdump 1 . Most useful when used with .Fl A . From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:32:44 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8BFAD10B; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7000B8FC13; Thu, 20 Dec 2012 00:32:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0WiCL022175; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0WifW022170; Thu, 20 Dec 2012 00:32:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200032.qBK0WifW022170@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244465 - in stable/7: sbin/setkey usr.sbin/ndp X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:32:44 -0000 Author: eadler Date: Thu Dec 20 00:32:43 2012 New Revision: 244465 URL: http://svnweb.freebsd.org/changeset/base/244465 Log: MFC r244318: Minor wording improvments to some manual pages Approved by: cperciva (implicit) Modified: stable/7/sbin/setkey/setkey.8 stable/7/usr.sbin/ndp/ndp.8 Directory Properties: stable/7/sbin/setkey/ (props changed) stable/7/usr.sbin/ndp/ (props changed) Modified: stable/7/sbin/setkey/setkey.8 ============================================================================== --- stable/7/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244464) +++ stable/7/sbin/setkey/setkey.8 Thu Dec 20 00:32:43 2012 (r244465) @@ -110,7 +110,7 @@ Loop forever and dump all the messages t .Dv PF_KEY socket. .Fl xx -makes each timestamps unformatted. +makes each timestamp unformatted. .El .Ss Configuration syntax With Modified: stable/7/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/7/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244464) +++ stable/7/usr.sbin/ndp/ndp.8 Thu Dec 20 00:32:43 2012 (r244465) @@ -236,8 +236,8 @@ responding to requests for .Ar hostname even though the host address is not its own. .It Fl t -Print timestamp on each entry, -making it possible to merge output with +Print timestamp for each entry, +to make it possible to merge the output with .Xr tcpdump 1 . Most useful when used with .Fl A . From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:35:09 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52F786B0; Thu, 20 Dec 2012 00:35:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 369A08FC12; Thu, 20 Dec 2012 00:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Z9M5022662; Thu, 20 Dec 2012 00:35:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Z9fx022661; Thu, 20 Dec 2012 00:35:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200035.qBK0Z9fx022661@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244467 - stable/9/share/misc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:35:09 -0000 Author: eadler Date: Thu Dec 20 00:35:08 2012 New Revision: 244467 URL: http://svnweb.freebsd.org/changeset/base/244467 Log: MFC r243890: Connect organization.dot to the build Approved by: cperciva (implicit) Modified: stable/9/share/misc/Makefile Directory Properties: stable/9/share/misc/ (props changed) Modified: stable/9/share/misc/Makefile ============================================================================== --- stable/9/share/misc/Makefile Thu Dec 20 00:34:54 2012 (r244466) +++ stable/9/share/misc/Makefile Thu Dec 20 00:35:08 2012 (r244467) @@ -6,7 +6,8 @@ FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot eqnchar flowers init.ee \ iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \ - scsi_modes usb_hid_usages usbdevs + scsi_modes usb_hid_usages usbdevs \ + organization.dot NO_OBJ= FILESDIR= ${BINDIR}/misc From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:35:09 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 916586B1; Thu, 20 Dec 2012 00:35:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 74D5D8FC15; Thu, 20 Dec 2012 00:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0Z9ig022668; Thu, 20 Dec 2012 00:35:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0Z9Qp022667; Thu, 20 Dec 2012 00:35:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200035.qBK0Z9Qp022667@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244468 - stable/8/share/misc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:35:09 -0000 Author: eadler Date: Thu Dec 20 00:35:08 2012 New Revision: 244468 URL: http://svnweb.freebsd.org/changeset/base/244468 Log: MFC r243890: Connect organization.dot to the build Approved by: cperciva (implicit) Modified: stable/8/share/misc/Makefile Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/Makefile ============================================================================== --- stable/8/share/misc/Makefile Thu Dec 20 00:35:08 2012 (r244467) +++ stable/8/share/misc/Makefile Thu Dec 20 00:35:08 2012 (r244468) @@ -6,7 +6,8 @@ FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot eqnchar flowers init.ee \ iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \ - scsi_modes usb_hid_usages usbdevs + scsi_modes usb_hid_usages usbdevs \ + organization.dot NO_OBJ= FILESDIR= ${BINDIR}/misc From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:37:12 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C18D6B07; Thu, 20 Dec 2012 00:37:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A4F7F8FC0C; Thu, 20 Dec 2012 00:37:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0bC03023022; Thu, 20 Dec 2012 00:37:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0bCdT023019; Thu, 20 Dec 2012 00:37:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200037.qBK0bCdT023019@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244470 - stable/9/sbin/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:37:12 -0000 Author: eadler Date: Thu Dec 20 00:37:11 2012 New Revision: 244470 URL: http://svnweb.freebsd.org/changeset/base/244470 Log: MFC r243932: Prefer the use of initalizer lists to ctor assignment. Approved by: cperciva (implicit) Modified: stable/9/sbin/devd/devd.cc stable/9/sbin/devd/devd.hh Directory Properties: stable/9/sbin/devd/ (props changed) Modified: stable/9/sbin/devd/devd.cc ============================================================================== --- stable/9/sbin/devd/devd.cc Thu Dec 20 00:35:26 2012 (r244469) +++ stable/9/sbin/devd/devd.cc Thu Dec 20 00:37:11 2012 (r244470) @@ -248,9 +248,8 @@ action::do_action(config &c) } match::match(config &c, const char *var, const char *re) - : _var(var) + : _var(var), _re("^") { - _re = "^"; _re.append(c.expand_string(string(re))); _re.append("$"); regcomp(&_regex, _re.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE); Modified: stable/9/sbin/devd/devd.hh ============================================================================== --- stable/9/sbin/devd/devd.hh Thu Dec 20 00:35:26 2012 (r244469) +++ stable/9/sbin/devd/devd.hh Thu Dec 20 00:37:11 2012 (r244470) @@ -143,7 +143,7 @@ private: class config { public: - config() { _pidfile = ""; push_var_table(); } + config() : _pidfile("") { push_var_table(); } virtual ~config() { reset(); } void add_attach(int, event_proc *); void add_detach(int, event_proc *); From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 00:41:00 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B627EAB; Thu, 20 Dec 2012 00:41:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 662D18FC12; Thu, 20 Dec 2012 00:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK0f0xg023664; Thu, 20 Dec 2012 00:41:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK0f0FL023661; Thu, 20 Dec 2012 00:41:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200041.qBK0f0FL023661@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 00:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244472 - stable/8/sys/dev/sound/pci/hda X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 00:41:00 -0000 Author: eadler Date: Thu Dec 20 00:40:59 2012 New Revision: 244472 URL: http://svnweb.freebsd.org/changeset/base/244472 Log: MFC r243793: Add support for hdmi hda codec onboard nvidia gt 440 graphics card PR: kern/174059 Approved by: cperciva (implicit) Modified: stable/8/sys/dev/sound/pci/hda/hdac.h stable/8/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdac.h Thu Dec 20 00:38:08 2012 (r244471) +++ stable/8/sys/dev/sound/pci/hda/hdac.h Thu Dec 20 00:40:59 2012 (r244472) @@ -573,6 +573,7 @@ #define HDA_CODEC_NVIDIAGT21X HDA_CODEC_CONSTRUCT(NVIDIA, 0x000b) #define HDA_CODEC_NVIDIAMCP89 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000c) #define HDA_CODEC_NVIDIAGT240 HDA_CODEC_CONSTRUCT(NVIDIA, 0x000d) +#define HDA_CODEC_NVIDIAGT440 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0014) #define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067) #define HDA_CODEC_NVIDIAMCP73 HDA_CODEC_CONSTRUCT(NVIDIA, 0x8001) #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) Modified: stable/8/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdacc.c Thu Dec 20 00:38:08 2012 (r244471) +++ stable/8/sys/dev/sound/pci/hda/hdacc.c Thu Dec 20 00:40:59 2012 (r244472) @@ -307,6 +307,7 @@ static const struct { { HDA_CODEC_NVIDIAGT21X, 0, "NVIDIA GT21x" }, { HDA_CODEC_NVIDIAMCP89, 0, "NVIDIA MCP89" }, { HDA_CODEC_NVIDIAGT240, 0, "NVIDIA GT240" }, + { HDA_CODEC_NVIDIAGT440, 0, "NVIDIA GT440" }, { HDA_CODEC_INTELIP, 0, "Intel Ibex Peak" }, { HDA_CODEC_INTELBL, 0, "Intel Bearlake" }, { HDA_CODEC_INTELCA, 0, "Intel Cantiga" }, From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 04:16:25 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBA6DD3B; Thu, 20 Dec 2012 04:16:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9FACF8FC12; Thu, 20 Dec 2012 04:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK4GPEC067058; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK4GPBQ067055; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200416.qBK4GPBQ067055@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 04:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244477 - stable/8/sys/dev/sio X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 04:16:25 -0000 Author: eadler Date: Thu Dec 20 04:16:25 2012 New Revision: 244477 URL: http://svnweb.freebsd.org/changeset/base/244477 Log: MFC r242996: Add support for CIR1000 - Cirrus Logic V34 to the sio driver PR: kern/44267 Approved by: cperciva (implicit) Modified: stable/8/sys/dev/sio/sio_isa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sio/ (props changed) Modified: stable/8/sys/dev/sio/sio_isa.c ============================================================================== --- stable/8/sys/dev/sio/sio_isa.c Thu Dec 20 03:33:33 2012 (r244476) +++ stable/8/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244477) @@ -83,6 +83,7 @@ static struct isa_pnp_id sio_ids[] = { {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 04:16:26 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15B0AD3C; Thu, 20 Dec 2012 04:16:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EE8128FC13; Thu, 20 Dec 2012 04:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK4GPJ6067074; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK4GPUk067073; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200416.qBK4GPUk067073@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 04:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244478 - stable/7/sys/dev/sio X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 04:16:26 -0000 Author: eadler Date: Thu Dec 20 04:16:25 2012 New Revision: 244478 URL: http://svnweb.freebsd.org/changeset/base/244478 Log: MFC r242996: Add support for CIR1000 - Cirrus Logic V34 to the sio driver PR: kern/44267 Approved by: cperciva (implicit) Modified: stable/7/sys/dev/sio/sio_isa.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/sio/sio_isa.c ============================================================================== --- stable/7/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244477) +++ stable/7/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244478) @@ -81,6 +81,7 @@ static struct isa_pnp_id sio_ids[] = { {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 04:16:26 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3824BD3D; Thu, 20 Dec 2012 04:16:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3A68FC14; Thu, 20 Dec 2012 04:16:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBK4GP9t067078; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBK4GPnj067075; Thu, 20 Dec 2012 04:16:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212200416.qBK4GPnj067075@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 04:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244479 - stable/9/sys/dev/sio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 04:16:26 -0000 Author: eadler Date: Thu Dec 20 04:16:25 2012 New Revision: 244479 URL: http://svnweb.freebsd.org/changeset/base/244479 Log: MFC r242996: Add support for CIR1000 - Cirrus Logic V34 to the sio driver PR: kern/44267 Approved by: cperciva (implicit) Modified: stable/9/sys/dev/sio/sio_isa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sio/sio_isa.c ============================================================================== --- stable/9/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244478) +++ stable/9/sys/dev/sio/sio_isa.c Thu Dec 20 04:16:25 2012 (r244479) @@ -83,6 +83,7 @@ static struct isa_pnp_id sio_ids[] = { {0x0034490a, NULL}, /* BRI3400 - Internal ACF Modem */ {0x0094490a, NULL}, /* BRI9400 - Boca K56Flex PnP */ {0x00b4490a, NULL}, /* BRIB400 - Boca 56k PnP */ + {0x0010320d, NULL}, /* CIR1000 - Cirrus Logic V34 */ {0x0030320d, NULL}, /* CIR3000 - Cirrus Logic V43 */ {0x0100440e, NULL}, /* CRD0001 - Cardinal MVP288IV ? */ {0x01308c0e, NULL}, /* CTL3001 - Creative Labs Phoneblaster */ From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 11:10:24 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CDC1F47; Thu, 20 Dec 2012 11:10:24 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CB0628FC0C; Thu, 20 Dec 2012 11:10:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBKBANLr033293; Thu, 20 Dec 2012 11:10:23 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBKBAN0S033290; Thu, 20 Dec 2012 11:10:23 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201212201110.qBKBAN0S033290@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 20 Dec 2012 11:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244483 - in stable/9/sys: netinet netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 11:10:24 -0000 Author: ae Date: Thu Dec 20 11:10:23 2012 New Revision: 244483 URL: http://svnweb.freebsd.org/changeset/base/244483 Log: MFC r244360: Use M_PROTO7 flag for M_IP6_NEXTHOP, because M_PROTO2 was used for M_AUTHIPHDR. MFC r244365: Since we use different flags to detect tcp forwarding, and we share the same code for IPv4 and IPv6 in tcp_input, we should check both M_IP_NEXTHOP and M_IP6_NEXTHOP flags. MFC r244386 (by glebius): Clear correct flag in INET6 case. MFC r244387 (by glebius): Fix !INET6 build after r244365. Modified: stable/9/sys/netinet/tcp_input.c stable/9/sys/netinet6/ip6_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Thu Dec 20 05:02:12 2012 (r244482) +++ stable/9/sys/netinet/tcp_input.c Thu Dec 20 11:10:23 2012 (r244483) @@ -792,7 +792,17 @@ findpcb: /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - if (m->m_flags & M_IP_NEXTHOP) + if ( +#ifdef INET6 + (isipv6 && (m->m_flags & M_IP6_NEXTHOP)) +#ifdef INET + || (!isipv6 && (m->m_flags & M_IP_NEXTHOP)) +#endif +#endif +#if defined(INET) && !defined(INET6) + (m->m_flags & M_IP_NEXTHOP) +#endif + ) fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); #ifdef INET6 @@ -821,7 +831,7 @@ findpcb: } /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); - m->m_flags &= ~M_IP_NEXTHOP; + m->m_flags &= ~M_IP6_NEXTHOP; fwd_tag = NULL; } else if (isipv6) { inp = in6_pcblookup_mbuf(&V_tcbinfo, &ip6->ip6_src, Modified: stable/9/sys/netinet6/ip6_var.h ============================================================================== --- stable/9/sys/netinet6/ip6_var.h Thu Dec 20 05:02:12 2012 (r244482) +++ stable/9/sys/netinet6/ip6_var.h Thu Dec 20 11:10:23 2012 (r244483) @@ -285,7 +285,7 @@ struct ip6aux { #define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */ #define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */ -#define M_IP6_NEXTHOP M_PROTO2 /* explicit ip nexthop */ +#define M_IP6_NEXTHOP M_PROTO7 /* explicit ip nexthop */ #ifdef __NO_STRICT_ALIGNMENT #define IP6_HDR_ALIGNED_P(ip) 1 From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 18:13:05 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 560A575E; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3A4C48FC0A; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBKID5M6096393; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBKID5h2096392; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212201813.qBKID5h2096392@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 18:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244497 - stable/8/usr.bin/fetch X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 18:13:05 -0000 Author: eadler Date: Thu Dec 20 18:13:04 2012 New Revision: 244497 URL: http://svnweb.freebsd.org/changeset/base/244497 Log: MFC r244037: Add check for failure of mkstemp and setenv. Approved by: cperciva (implicit) Modified: stable/8/usr.bin/fetch/fetch.c Directory Properties: stable/8/usr.bin/fetch/ (props changed) Modified: stable/8/usr.bin/fetch/fetch.c ============================================================================== --- stable/8/usr.bin/fetch/fetch.c Thu Dec 20 18:12:40 2012 (r244496) +++ stable/8/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244497) @@ -604,7 +604,10 @@ fetch(char *URL, const char *path) asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s", (int)(slash - path), path, slash); if (tmppath != NULL) { - mkstemps(tmppath, strlen(slash) + 1); + if (mkstemps(tmppath, strlen(slash) + 1) == -1) { + warn("%s: mkstemps()", path); + goto failure; + } of = fopen(tmppath, "w"); chown(tmppath, sb.st_uid, sb.st_gid); chmod(tmppath, sb.st_mode & ALLPERMS); @@ -974,7 +977,8 @@ main(int argc, char *argv[]) if (v_tty) fetchAuthMethod = query_auth; if (N_filename != NULL) - setenv("NETRC", N_filename, 1); + if (setenv("NETRC", N_filename, 1) == -1) + err(1, "setenv: cannot set NETRC=%s", N_filename); while (argc) { if ((p = strrchr(*argv, '/')) == NULL) From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 18:13:05 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A207775F; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86ED58FC12; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBKID5Is096403; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBKID5oZ096401; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212201813.qBKID5oZ096401@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 18:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r244498 - stable/7/usr.bin/fetch X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 18:13:05 -0000 Author: eadler Date: Thu Dec 20 18:13:04 2012 New Revision: 244498 URL: http://svnweb.freebsd.org/changeset/base/244498 Log: MFC r244037: Add check for failure of mkstemp and setenv. Approved by: cperciva (implicit) Modified: stable/7/usr.bin/fetch/fetch.c Directory Properties: stable/7/usr.bin/fetch/ (props changed) Modified: stable/7/usr.bin/fetch/fetch.c ============================================================================== --- stable/7/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244497) +++ stable/7/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244498) @@ -604,7 +604,10 @@ fetch(char *URL, const char *path) asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s", (int)(slash - path), path, slash); if (tmppath != NULL) { - mkstemps(tmppath, strlen(slash) + 1); + if (mkstemps(tmppath, strlen(slash) + 1) == -1) { + warn("%s: mkstemps()", path); + goto failure; + } of = fopen(tmppath, "w"); chown(tmppath, sb.st_uid, sb.st_gid); chmod(tmppath, sb.st_mode & ALLPERMS); @@ -969,7 +972,8 @@ main(int argc, char *argv[]) if (v_tty) fetchAuthMethod = query_auth; if (N_filename != NULL) - setenv("NETRC", N_filename, 1); + if (setenv("NETRC", N_filename, 1) == -1) + err(1, "setenv: cannot set NETRC=%s", N_filename); while (argc) { if ((p = strrchr(*argv, '/')) == NULL) From owner-svn-src-stable@FreeBSD.ORG Thu Dec 20 18:13:05 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A26D6760; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 835FC8FC0C; Thu, 20 Dec 2012 18:13:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBKID5rC096402; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBKID5fY096400; Thu, 20 Dec 2012 18:13:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212201813.qBKID5fY096400@svn.freebsd.org> From: Eitan Adler Date: Thu, 20 Dec 2012 18:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244499 - stable/9/usr.bin/fetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2012 18:13:05 -0000 Author: eadler Date: Thu Dec 20 18:13:04 2012 New Revision: 244499 URL: http://svnweb.freebsd.org/changeset/base/244499 Log: MFC r244037: Add check for failure of mkstemp and setenv. Approved by: cperciva (implicit) Modified: stable/9/usr.bin/fetch/fetch.c Directory Properties: stable/9/usr.bin/fetch/ (props changed) Modified: stable/9/usr.bin/fetch/fetch.c ============================================================================== --- stable/9/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244498) +++ stable/9/usr.bin/fetch/fetch.c Thu Dec 20 18:13:04 2012 (r244499) @@ -604,7 +604,10 @@ fetch(char *URL, const char *path) asprintf(&tmppath, "%.*s.fetch.XXXXXX.%s", (int)(slash - path), path, slash); if (tmppath != NULL) { - mkstemps(tmppath, strlen(slash) + 1); + if (mkstemps(tmppath, strlen(slash) + 1) == -1) { + warn("%s: mkstemps()", path); + goto failure; + } of = fopen(tmppath, "w"); chown(tmppath, sb.st_uid, sb.st_gid); chmod(tmppath, sb.st_mode & ALLPERMS); @@ -974,7 +977,8 @@ main(int argc, char *argv[]) if (v_tty) fetchAuthMethod = query_auth; if (N_filename != NULL) - setenv("NETRC", N_filename, 1); + if (setenv("NETRC", N_filename, 1) == -1) + err(1, "setenv: cannot set NETRC=%s", N_filename); while (argc) { if ((p = strrchr(*argv, '/')) == NULL) From owner-svn-src-stable@FreeBSD.ORG Fri Dec 21 00:41:56 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A491110B; Fri, 21 Dec 2012 00:41:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 87E738FC13; Fri, 21 Dec 2012 00:41:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBL0fufh054813; Fri, 21 Dec 2012 00:41:56 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBL0fqcu054784; Fri, 21 Dec 2012 00:41:52 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201212210041.qBL0fqcu054784@svn.freebsd.org> From: Xin LI Date: Fri, 21 Dec 2012 00:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244524 - in stable/9/sys: netinet netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 00:41:56 -0000 Author: delphij Date: Fri Dec 21 00:41:52 2012 New Revision: 244524 URL: http://svnweb.freebsd.org/changeset/base/244524 Log: MFC r241916: Remove __P. Submitted by: kevlo Modified: stable/9/sys/netinet/sctp_uio.h stable/9/sys/netinet/sctp_var.h stable/9/sys/netinet6/icmp6.c stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/in6.h stable/9/sys/netinet6/in6_gif.h stable/9/sys/netinet6/in6_ifattach.h stable/9/sys/netinet6/in6_pcb.h stable/9/sys/netinet6/in6_src.c stable/9/sys/netinet6/in6_var.h stable/9/sys/netinet6/ip6_output.c stable/9/sys/netinet6/ip6_var.h stable/9/sys/netinet6/ip6protosw.h stable/9/sys/netinet6/nd6.c stable/9/sys/netinet6/nd6.h stable/9/sys/netinet6/nd6_rtr.c stable/9/sys/netinet6/pim6_var.h stable/9/sys/netinet6/scope6_var.h stable/9/sys/netinet6/sctp6_var.h stable/9/sys/netinet6/tcp6_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet/sctp_uio.h Fri Dec 21 00:41:52 2012 (r244524) @@ -1267,44 +1267,44 @@ sctp_sorecvmsg(struct socket *so, #if !(defined(_KERNEL)) && !(defined(__Userspace__)) __BEGIN_DECLS -int sctp_peeloff __P((int, sctp_assoc_t)); -int sctp_bindx __P((int, struct sockaddr *, int, int)); -int sctp_connectx __P((int, const struct sockaddr *, int, sctp_assoc_t *)); -int sctp_getaddrlen __P((sa_family_t)); -int sctp_getpaddrs __P((int, sctp_assoc_t, struct sockaddr **)); -void sctp_freepaddrs __P((struct sockaddr *)); -int sctp_getladdrs __P((int, sctp_assoc_t, struct sockaddr **)); -void sctp_freeladdrs __P((struct sockaddr *)); -int sctp_opt_info __P((int, sctp_assoc_t, int, void *, socklen_t *)); +int sctp_peeloff(int, sctp_assoc_t); +int sctp_bindx(int, struct sockaddr *, int, int); +int sctp_connectx(int, const struct sockaddr *, int, sctp_assoc_t *); +int sctp_getaddrlen(sa_family_t); +int sctp_getpaddrs(int, sctp_assoc_t, struct sockaddr **); +void sctp_freepaddrs(struct sockaddr *); +int sctp_getladdrs(int, sctp_assoc_t, struct sockaddr **); +void sctp_freeladdrs(struct sockaddr *); +int sctp_opt_info(int, sctp_assoc_t, int, void *, socklen_t *); /* deprecated */ ssize_t sctp_sendmsg -__P((int, const void *, size_t, const struct sockaddr *, - socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); +(int, const void *, size_t, const struct sockaddr *, + socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); /* deprecated */ - ssize_t sctp_send __P((int, const void *, size_t, - const struct sctp_sndrcvinfo *, int)); + ssize_t sctp_send(int, const void *, size_t, + const struct sctp_sndrcvinfo *, int); /* deprecated */ - ssize_t sctp_sendx __P((int, const void *, size_t, struct sockaddr *, - int, struct sctp_sndrcvinfo *, int)); + ssize_t sctp_sendx(int, const void *, size_t, struct sockaddr *, + int, struct sctp_sndrcvinfo *, int); /* deprecated */ - ssize_t sctp_sendmsgx __P((int sd, const void *, size_t, struct sockaddr *, - int, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); + ssize_t sctp_sendmsgx(int sd, const void *, size_t, struct sockaddr *, + int, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); - sctp_assoc_t sctp_getassocid __P((int, struct sockaddr *)); + sctp_assoc_t sctp_getassocid(int, struct sockaddr *); /* deprecated */ - ssize_t sctp_recvmsg __P((int, void *, size_t, struct sockaddr *, socklen_t *, - struct sctp_sndrcvinfo *, int *)); + ssize_t sctp_recvmsg(int, void *, size_t, struct sockaddr *, socklen_t *, + struct sctp_sndrcvinfo *, int *); - ssize_t sctp_sendv __P((int, const struct iovec *, int, struct sockaddr *, - int, void *, socklen_t, unsigned int, int)); + ssize_t sctp_sendv(int, const struct iovec *, int, struct sockaddr *, + int, void *, socklen_t, unsigned int, int); - ssize_t sctp_recvv __P((int, const struct iovec *, int, struct sockaddr *, - socklen_t *, void *, socklen_t *, unsigned int *, int *)); + ssize_t sctp_recvv(int, const struct iovec *, int, struct sockaddr *, + socklen_t *, void *, socklen_t *, unsigned int *, int *); __END_DECLS Modified: stable/9/sys/netinet/sctp_var.h ============================================================================== --- stable/9/sys/netinet/sctp_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet/sctp_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -322,29 +322,29 @@ struct sctphdr; void sctp_close(struct socket *so); int sctp_disconnect(struct socket *so); -void sctp_ctlinput __P((int, struct sockaddr *, void *)); -int sctp_ctloutput __P((struct socket *, struct sockopt *)); +void sctp_ctlinput(int, struct sockaddr *, void *); +int sctp_ctloutput(struct socket *, struct sockopt *); #ifdef INET -void sctp_input_with_port __P((struct mbuf *, int, uint16_t)); +void sctp_input_with_port(struct mbuf *, int, uint16_t); #endif #ifdef INET -void sctp_input __P((struct mbuf *, int)); +void sctp_input(struct mbuf *, int); #endif -void sctp_pathmtu_adjustment __P((struct sctp_tcb *, uint16_t)); -void sctp_drain __P((void)); -void sctp_init __P((void)); +void sctp_pathmtu_adjustment(struct sctp_tcb *, uint16_t); +void sctp_drain(void); +void sctp_init(void); void sctp_finish(void); int sctp_flush(struct socket *, int); -int sctp_shutdown __P((struct socket *)); +int sctp_shutdown(struct socket *); void sctp_notify -__P((struct sctp_inpcb *, struct ip *ip, struct sctphdr *, +(struct sctp_inpcb *, struct ip *ip, struct sctphdr *, struct sockaddr *, struct sctp_tcb *, - struct sctp_nets *)); + struct sctp_nets *); int sctp_bindx(struct socket *, int, struct sockaddr_storage *, int, int, struct proc *); Modified: stable/9/sys/netinet6/icmp6.c ============================================================================== --- stable/9/sys/netinet6/icmp6.c Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/icmp6.c Fri Dec 21 00:41:52 2012 (r244524) @@ -133,15 +133,15 @@ VNET_DECLARE(int, icmp6_nodeinfo); static void icmp6_errcount(struct icmp6errstat *, int, int); static int icmp6_rip6_input(struct mbuf **, int); static int icmp6_ratelimit(const struct in6_addr *, const int, const int); -static const char *icmp6_redirect_diag __P((struct in6_addr *, - struct in6_addr *, struct in6_addr *)); +static const char *icmp6_redirect_diag(struct in6_addr *, + struct in6_addr *, struct in6_addr *); static struct mbuf *ni6_input(struct mbuf *, int); static struct mbuf *ni6_nametodns(const char *, int, int); static int ni6_dnsmatch(const char *, int, const char *, int); -static int ni6_addrs __P((struct icmp6_nodeinfo *, struct mbuf *, - struct ifnet **, struct in6_addr *)); -static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, - struct ifnet *, int)); +static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, + struct ifnet **, struct in6_addr *); +static int ni6_store_addrs(struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, + struct ifnet *, int); static int icmp6_notify_error(struct mbuf **, int, int, int); /* Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6.c Fri Dec 21 00:41:52 2012 (r244524) @@ -128,10 +128,10 @@ const struct in6_addr in6mask128 = IN6MA const struct sockaddr_in6 sa6_any = { sizeof(sa6_any), AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0 }; -static int in6_lifaddr_ioctl __P((struct socket *, u_long, caddr_t, - struct ifnet *, struct thread *)); -static int in6_ifinit __P((struct ifnet *, struct in6_ifaddr *, - struct sockaddr_in6 *, int)); +static int in6_lifaddr_ioctl(struct socket *, u_long, caddr_t, + struct ifnet *, struct thread *); +static int in6_ifinit(struct ifnet *, struct in6_ifaddr *, + struct sockaddr_in6 *, int); static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *); int (*faithprefix_p)(struct in6_addr *); Modified: stable/9/sys/netinet6/in6.h ============================================================================== --- stable/9/sys/netinet6/in6.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6.h Fri Dec 21 00:41:52 2012 (r244524) @@ -635,22 +635,22 @@ struct cmsghdr; struct ip6_hdr; int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); -int in6_cksum __P((struct mbuf *, u_int8_t, u_int32_t, u_int32_t)); -int in6_localaddr __P((struct in6_addr *)); +int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); +int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); -int in6_addrscope __P((struct in6_addr *)); -struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct in6_addr *)); -extern void in6_if_up __P((struct ifnet *)); +int in6_addrscope(struct in6_addr *); +struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *); +extern void in6_if_up(struct ifnet *); struct sockaddr; extern u_char ip6_protox[]; -void in6_sin6_2_sin __P((struct sockaddr_in *sin, - struct sockaddr_in6 *sin6)); -void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin, - struct sockaddr_in6 *sin6)); -void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam)); -void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr **nam)); -extern void addrsel_policy_init __P((void)); +void in6_sin6_2_sin(struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); +void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); +void in6_sin6_2_sin_in_sock(struct sockaddr *nam); +void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); +extern void addrsel_policy_init(void); #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) @@ -674,43 +674,43 @@ typedef __socklen_t socklen_t; __BEGIN_DECLS struct cmsghdr; -extern int inet6_option_space __P((int)); -extern int inet6_option_init __P((void *, struct cmsghdr **, int)); -extern int inet6_option_append __P((struct cmsghdr *, const uint8_t *, - int, int)); -extern uint8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, int)); -extern int inet6_option_next __P((const struct cmsghdr *, uint8_t **)); -extern int inet6_option_find __P((const struct cmsghdr *, uint8_t **, int)); - -extern size_t inet6_rthdr_space __P((int, int)); -extern struct cmsghdr *inet6_rthdr_init __P((void *, int)); -extern int inet6_rthdr_add __P((struct cmsghdr *, const struct in6_addr *, - unsigned int)); -extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned int)); +extern int inet6_option_space(int); +extern int inet6_option_init(void *, struct cmsghdr **, int); +extern int inet6_option_append(struct cmsghdr *, const uint8_t *, + int, int); +extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); +extern int inet6_option_next(const struct cmsghdr *, uint8_t **); +extern int inet6_option_find(const struct cmsghdr *, uint8_t **, int); + +extern size_t inet6_rthdr_space(int, int); +extern struct cmsghdr *inet6_rthdr_init(void *, int); +extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, + unsigned int); +extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); #if 0 /* not implemented yet */ -extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct cmsghdr *)); +extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); #endif -extern int inet6_rthdr_segments __P((const struct cmsghdr *)); -extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, int)); -extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int)); - -extern int inet6_opt_init __P((void *, socklen_t)); -extern int inet6_opt_append __P((void *, socklen_t, int, uint8_t, socklen_t, - uint8_t, void **)); -extern int inet6_opt_finish __P((void *, socklen_t, int)); -extern int inet6_opt_set_val __P((void *, int, void *, socklen_t)); - -extern int inet6_opt_next __P((void *, socklen_t, int, uint8_t *, socklen_t *, - void **)); -extern int inet6_opt_find __P((void *, socklen_t, int, uint8_t, socklen_t *, - void **)); -extern int inet6_opt_get_val __P((void *, int, void *, socklen_t)); -extern socklen_t inet6_rth_space __P((int, int)); -extern void *inet6_rth_init __P((void *, socklen_t, int, int)); -extern int inet6_rth_add __P((void *, const struct in6_addr *)); -extern int inet6_rth_reverse __P((const void *, void *)); -extern int inet6_rth_segments __P((const void *)); -extern struct in6_addr *inet6_rth_getaddr __P((const void *, int)); +extern int inet6_rthdr_segments(const struct cmsghdr *); +extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); +extern int inet6_rthdr_getflags(const struct cmsghdr *, int); + +extern int inet6_opt_init(void *, socklen_t); +extern int inet6_opt_append(void *, socklen_t, int, uint8_t, socklen_t, + uint8_t, void **); +extern int inet6_opt_finish(void *, socklen_t, int); +extern int inet6_opt_set_val(void *, int, void *, socklen_t); + +extern int inet6_opt_next(void *, socklen_t, int, uint8_t *, socklen_t *, + void **); +extern int inet6_opt_find(void *, socklen_t, int, uint8_t, socklen_t *, + void **); +extern int inet6_opt_get_val(void *, int, void *, socklen_t); +extern socklen_t inet6_rth_space(int, int); +extern void *inet6_rth_init(void *, socklen_t, int, int); +extern int inet6_rth_add(void *, const struct in6_addr *); +extern int inet6_rth_reverse(const void *, void *); +extern int inet6_rth_segments(const void *); +extern struct in6_addr *inet6_rth_getaddr(const void *, int); __END_DECLS #endif /* __BSD_VISIBLE */ Modified: stable/9/sys/netinet6/in6_gif.h ============================================================================== --- stable/9/sys/netinet6/in6_gif.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6_gif.h Fri Dec 21 00:41:52 2012 (r244524) @@ -36,10 +36,10 @@ #define GIF_HLIM 30 struct gif_softc; -int in6_gif_input __P((struct mbuf **, int *, int)); -int in6_gif_output __P((struct ifnet *, int, struct mbuf *)); -int gif_encapcheck6 __P((const struct mbuf *, int, int, void *)); -int in6_gif_attach __P((struct gif_softc *)); -int in6_gif_detach __P((struct gif_softc *)); +int in6_gif_input(struct mbuf **, int *, int); +int in6_gif_output(struct ifnet *, int, struct mbuf *); +int gif_encapcheck6(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +int in6_gif_detach(struct gif_softc *); #endif /* _NETINET6_IN6_GIF_H_ */ Modified: stable/9/sys/netinet6/in6_ifattach.h ============================================================================== --- stable/9/sys/netinet6/in6_ifattach.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6_ifattach.h Fri Dec 21 00:41:52 2012 (r244524) @@ -34,12 +34,12 @@ #define _NETINET6_IN6_IFATTACH_H_ #ifdef _KERNEL -void in6_ifattach __P((struct ifnet *, struct ifnet *)); -void in6_ifdetach __P((struct ifnet *)); -int in6_get_tmpifid __P((struct ifnet *, u_int8_t *, const u_int8_t *, int)); -void in6_tmpaddrtimer __P((void *)); -int in6_get_hw_ifid __P((struct ifnet *, struct in6_addr *)); -int in6_nigroup __P((struct ifnet *, const char *, int, struct in6_addr *)); +void in6_ifattach(struct ifnet *, struct ifnet *); +void in6_ifdetach(struct ifnet *); +int in6_get_tmpifid(struct ifnet *, u_int8_t *, const u_int8_t *, int); +void in6_tmpaddrtimer(void *); +int in6_get_hw_ifid(struct ifnet *, struct in6_addr *); +int in6_nigroup(struct ifnet *, const char *, int, struct in6_addr *); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_IFATTACH_H_ */ Modified: stable/9/sys/netinet6/in6_pcb.h ============================================================================== --- stable/9/sys/netinet6/in6_pcb.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6_pcb.h Fri Dec 21 00:41:52 2012 (r244524) @@ -72,53 +72,53 @@ struct inpcbgroup * in6_pcbgroup_byhash(struct inpcbinfo *, u_int, uint32_t); struct inpcbgroup * - in6_pcbgroup_byinpcb __P((struct inpcb *)); + in6_pcbgroup_byinpcb(struct inpcb *); struct inpcbgroup * in6_pcbgroup_bymbuf(struct inpcbinfo *, struct mbuf *); struct inpcbgroup * - in6_pcbgroup_bytuple __P((struct inpcbinfo *, const struct in6_addr *, - u_short, const struct in6_addr *, u_short)); + in6_pcbgroup_bytuple(struct inpcbinfo *, const struct in6_addr *, + u_short, const struct in6_addr *, u_short); -void in6_pcbpurgeif0 __P((struct inpcbinfo *, struct ifnet *)); -void in6_losing __P((struct inpcb *)); -int in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct ucred *)); -int in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct ucred *)); -int in6_pcbconnect_mbuf __P((struct inpcb *, struct sockaddr *, - struct ucred *, struct mbuf *)); -void in6_pcbdisconnect __P((struct inpcb *)); +void in6_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); +void in6_losing(struct inpcb *); +int in6_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in6_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); +int in6_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, + struct ucred *, struct mbuf *); +void in6_pcbdisconnect(struct inpcb *); int in6_pcbladdr(struct inpcb *, struct sockaddr *, struct in6_addr *); struct inpcb * - in6_pcblookup_local __P((struct inpcbinfo *, + in6_pcblookup_local(struct inpcbinfo *, struct in6_addr *, u_short, int, - struct ucred *)); + struct ucred *); struct inpcb * - in6_pcblookup __P((struct inpcbinfo *, struct in6_addr *, + in6_pcblookup(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, - struct ifnet *)); + struct ifnet *); struct inpcb * - in6_pcblookup_hash_locked __P((struct inpcbinfo *, struct in6_addr *, + in6_pcblookup_hash_locked(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, - struct ifnet *)); + struct ifnet *); struct inpcb * - in6_pcblookup_mbuf __P((struct inpcbinfo *, struct in6_addr *, + in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, - struct ifnet *ifp, struct mbuf *)); -void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *, + struct ifnet *ifp, struct mbuf *); +void in6_pcbnotify(struct inpcbinfo *, struct sockaddr *, u_int, const struct sockaddr *, u_int, int, void *, - struct inpcb *(*)(struct inpcb *, int))); + struct inpcb *(*)(struct inpcb *, int)); struct inpcb * - in6_rtchange __P((struct inpcb *, int)); + in6_rtchange(struct inpcb *, int); struct sockaddr * - in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p)); + in6_sockaddr(in_port_t port, struct in6_addr *addr_p); struct sockaddr * - in6_v4mapsin6_sockaddr __P((in_port_t port, struct in_addr *addr_p)); -int in6_getpeeraddr __P((struct socket *so, struct sockaddr **nam)); -int in6_getsockaddr __P((struct socket *so, struct sockaddr **nam)); -int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam)); -int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam)); -int in6_selecthlim __P((struct in6pcb *, struct ifnet *)); -int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct ucred *)); -void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m)); + in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p); +int in6_getpeeraddr(struct socket *so, struct sockaddr **nam); +int in6_getsockaddr(struct socket *so, struct sockaddr **nam); +int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); +int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); +int in6_selecthlim(struct in6pcb *, struct ifnet *); +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); #endif /* _KERNEL */ #endif /* !_NETINET6_IN6_PCB_H_ */ Modified: stable/9/sys/netinet6/in6_src.c ============================================================================== --- stable/9/sys/netinet6/in6_src.c Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6_src.c Fri Dec 21 00:41:52 2012 (r244524) @@ -127,20 +127,20 @@ static VNET_DEFINE(struct in6_addrpolicy VNET_DEFINE(int, ip6_prefer_tempaddr) = 0; -static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, +static int selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int, u_int)); -static int in6_selectif __P((struct sockaddr_in6 *, struct ip6_pktopts *, + struct rtentry **, int, u_int); +static int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *ro, struct ifnet **, - struct ifnet *, u_int)); + struct ifnet *, u_int); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); static void init_policy_queue(void); static int add_addrsel_policyent(struct in6_addrpolicy *); static int delete_addrsel_policyent(struct in6_addrpolicy *); -static int walk_addrsel_policy __P((int (*)(struct in6_addrpolicy *, void *), - void *)); +static int walk_addrsel_policy(int (*)(struct in6_addrpolicy *, void *), + void *); static int dump_addrsel_policyent(struct in6_addrpolicy *, void *); static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); Modified: stable/9/sys/netinet6/in6_var.h ============================================================================== --- stable/9/sys/netinet6/in6_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/in6_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -750,36 +750,36 @@ int in6_leavegroup(struct in6_multi_mshi /* flags to in6_update_ifa */ #define IN6_IFAUPDATE_DADDELAY 0x1 /* first time to configure an address */ -int in6_mask2len __P((struct in6_addr *, u_char *)); -int in6_control __P((struct socket *, u_long, caddr_t, struct ifnet *, - struct thread *)); -int in6_update_ifa __P((struct ifnet *, struct in6_aliasreq *, - struct in6_ifaddr *, int)); -void in6_purgeaddr __P((struct ifaddr *)); -int in6if_do_dad __P((struct ifnet *)); -void in6_purgeif __P((struct ifnet *)); -void in6_savemkludge __P((struct in6_ifaddr *)); -void *in6_domifattach __P((struct ifnet *)); -void in6_domifdetach __P((struct ifnet *, void *)); -void in6_setmaxmtu __P((void)); -int in6_if2idlen __P((struct ifnet *)); -struct in6_ifaddr *in6ifa_ifpforlinklocal __P((struct ifnet *, int)); -struct in6_ifaddr *in6ifa_ifpwithaddr __P((struct ifnet *, struct in6_addr *)); -char *ip6_sprintf __P((char *, const struct in6_addr *)); -int in6_addr2zoneid __P((struct ifnet *, struct in6_addr *, u_int32_t *)); -int in6_matchlen __P((struct in6_addr *, struct in6_addr *)); -int in6_are_prefix_equal __P((struct in6_addr *, struct in6_addr *, int)); -void in6_prefixlen2mask __P((struct in6_addr *, int)); -int in6_prefix_ioctl __P((struct socket *, u_long, caddr_t, - struct ifnet *)); -int in6_prefix_add_ifid __P((int, struct in6_ifaddr *)); -void in6_prefix_remove_ifid __P((int, struct in6_ifaddr *)); -void in6_purgeprefix __P((struct ifnet *)); +int in6_mask2len(struct in6_addr *, u_char *); +int in6_control(struct socket *, u_long, caddr_t, struct ifnet *, + struct thread *); +int in6_update_ifa(struct ifnet *, struct in6_aliasreq *, + struct in6_ifaddr *, int); +void in6_purgeaddr(struct ifaddr *); +int in6if_do_dad(struct ifnet *); +void in6_purgeif(struct ifnet *); +void in6_savemkludge(struct in6_ifaddr *); +void *in6_domifattach(struct ifnet *); +void in6_domifdetach(struct ifnet *, void *); +void in6_setmaxmtu(void); +int in6_if2idlen(struct ifnet *); +struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); +struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); +char *ip6_sprintf(char *, const struct in6_addr *); +int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *); +int in6_matchlen(struct in6_addr *, struct in6_addr *); +int in6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int); +void in6_prefixlen2mask(struct in6_addr *, int); +int in6_prefix_ioctl(struct socket *, u_long, caddr_t, + struct ifnet *); +int in6_prefix_add_ifid(int, struct in6_ifaddr *); +void in6_prefix_remove_ifid(int, struct in6_ifaddr *); +void in6_purgeprefix(struct ifnet *); void in6_ifremloop(struct ifaddr *); void in6_ifaddloop(struct ifaddr *); -int in6_is_addr_deprecated __P((struct sockaddr_in6 *)); -int in6_src_ioctl __P((u_long, caddr_t)); +int in6_is_addr_deprecated(struct sockaddr_in6 *); +int in6_src_ioctl(u_long, caddr_t); /* * Extended API for IPv6 FIB support. Modified: stable/9/sys/netinet6/ip6_output.c ============================================================================== --- stable/9/sys/netinet6/ip6_output.c Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/ip6_output.c Fri Dec 21 00:41:52 2012 (r244524) @@ -130,21 +130,21 @@ struct ip6_exthdrs { struct mbuf *ip6e_dest2; }; -static int ip6_pcbopt __P((int, u_char *, int, struct ip6_pktopts **, - struct ucred *, int)); -static int ip6_pcbopts __P((struct ip6_pktopts **, struct mbuf *, - struct socket *, struct sockopt *)); +static int ip6_pcbopt(int, u_char *, int, struct ip6_pktopts **, + struct ucred *, int); +static int ip6_pcbopts(struct ip6_pktopts **, struct mbuf *, + struct socket *, struct sockopt *); static int ip6_getpcbopt(struct ip6_pktopts *, int, struct sockopt *); -static int ip6_setpktopt __P((int, u_char *, int, struct ip6_pktopts *, - struct ucred *, int, int, int)); +static int ip6_setpktopt(int, u_char *, int, struct ip6_pktopts *, + struct ucred *, int, int, int); static int ip6_copyexthdr(struct mbuf **, caddr_t, int); -static int ip6_insertfraghdr __P((struct mbuf *, struct mbuf *, int, - struct ip6_frag **)); +static int ip6_insertfraghdr(struct mbuf *, struct mbuf *, int, + struct ip6_frag **); static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t); static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *); -static int ip6_getpmtu __P((struct route_in6 *, struct route_in6 *, - struct ifnet *, struct in6_addr *, u_long *, int *, u_int)); +static int ip6_getpmtu(struct route_in6 *, struct route_in6 *, + struct ifnet *, struct in6_addr *, u_long *, int *, u_int); static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int); Modified: stable/9/sys/netinet6/ip6_var.h ============================================================================== --- stable/9/sys/netinet6/ip6_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/ip6_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -371,87 +371,87 @@ struct sockopt; struct inpcb; -int icmp6_ctloutput __P((struct socket *, struct sockopt *sopt)); +int icmp6_ctloutput(struct socket *, struct sockopt *sopt); struct in6_ifaddr; -void ip6_init __P((void)); +void ip6_init(void); #ifdef VIMAGE -void ip6_destroy __P((void)); +void ip6_destroy(void); #endif int ip6proto_register(short); int ip6proto_unregister(short); -void ip6_input __P((struct mbuf *)); -struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *)); -void ip6_freepcbopts __P((struct ip6_pktopts *)); - -int ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int)); -char * ip6_get_prevhdr __P((struct mbuf *, int)); -int ip6_nexthdr __P((struct mbuf *, int, int, int *)); -int ip6_lasthdr __P((struct mbuf *, int, int, int *)); +void ip6_input(struct mbuf *); +struct in6_ifaddr *ip6_getdstifaddr(struct mbuf *); +void ip6_freepcbopts(struct ip6_pktopts *); + +int ip6_unknown_opt(u_int8_t *, struct mbuf *, int); +char * ip6_get_prevhdr(struct mbuf *, int); +int ip6_nexthdr(struct mbuf *, int, int, int *); +int ip6_lasthdr(struct mbuf *, int, int, int *); #ifdef __notyet__ -struct ip6aux *ip6_findaux __P((struct mbuf *)); +struct ip6aux *ip6_findaux(struct mbuf *); #endif extern int (*ip6_mforward)(struct ip6_hdr *, struct ifnet *, struct mbuf *); -int ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *, - u_int32_t *)); +int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *, + u_int32_t *); struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *, struct mbuf **, int *); -void ip6_savecontrol __P((struct inpcb *, struct mbuf *, struct mbuf **)); -void ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *, - u_int32_t *)); -int ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t)); +void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **); +void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, + u_int32_t *); +int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t); -void ip6_forward __P((struct mbuf *, int)); +void ip6_forward(struct mbuf *, int); -void ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *)); -int ip6_output __P((struct mbuf *, struct ip6_pktopts *, +void ip6_mloopback(struct ifnet *, struct mbuf *, struct sockaddr_in6 *); +int ip6_output(struct mbuf *, struct ip6_pktopts *, struct route_in6 *, int, struct ip6_moptions *, struct ifnet **, - struct inpcb *)); -int ip6_ctloutput __P((struct socket *, struct sockopt *)); -int ip6_raw_ctloutput __P((struct socket *, struct sockopt *)); -void ip6_initpktopts __P((struct ip6_pktopts *)); -int ip6_setpktopts __P((struct mbuf *, struct ip6_pktopts *, - struct ip6_pktopts *, struct ucred *, int)); -void ip6_clearpktopts __P((struct ip6_pktopts *, int)); -struct ip6_pktopts *ip6_copypktopts __P((struct ip6_pktopts *, int)); -int ip6_optlen __P((struct inpcb *)); - -int route6_input __P((struct mbuf **, int *, int)); - -void frag6_init __P((void)); -int frag6_input __P((struct mbuf **, int *, int)); -void frag6_slowtimo __P((void)); -void frag6_drain __P((void)); - -void rip6_init __P((void)); -int rip6_input __P((struct mbuf **, int *, int)); -void rip6_ctlinput __P((int, struct sockaddr *, void *)); -int rip6_ctloutput __P((struct socket *, struct sockopt *)); -int rip6_output __P((struct mbuf *, ...)); -int rip6_usrreq __P((struct socket *, - int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *)); + struct inpcb *); +int ip6_ctloutput(struct socket *, struct sockopt *); +int ip6_raw_ctloutput(struct socket *, struct sockopt *); +void ip6_initpktopts(struct ip6_pktopts *); +int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *, + struct ip6_pktopts *, struct ucred *, int); +void ip6_clearpktopts(struct ip6_pktopts *, int); +struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int); +int ip6_optlen(struct inpcb *); + +int route6_input(struct mbuf **, int *, int); + +void frag6_init(void); +int frag6_input(struct mbuf **, int *, int); +void frag6_slowtimo(void); +void frag6_drain(void); + +void rip6_init(void); +int rip6_input(struct mbuf **, int *, int); +void rip6_ctlinput(int, struct sockaddr *, void *); +int rip6_ctloutput(struct socket *, struct sockopt *); +int rip6_output(struct mbuf *, ...); +int rip6_usrreq(struct socket *, + int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *); -int dest6_input __P((struct mbuf **, int *, int)); -int none_input __P((struct mbuf **, int *, int)); +int dest6_input(struct mbuf **, int *, int); +int none_input(struct mbuf **, int *, int); int in6_selectsrc(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *inp, struct route_in6 *, struct ucred *cred, struct ifnet **, struct in6_addr *); -int in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, +int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **)); + struct rtentry **); int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct rtentry **, u_int); -u_int32_t ip6_randomid __P((void)); -u_int32_t ip6_randomflowlabel __P((void)); +u_int32_t ip6_randomid(void); +u_int32_t ip6_randomflowlabel(void); #endif /* _KERNEL */ #endif /* !_NETINET6_IP6_VAR_H_ */ Modified: stable/9/sys/netinet6/ip6protosw.h ============================================================================== --- stable/9/sys/netinet6/ip6protosw.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/ip6protosw.h Fri Dec 21 00:41:52 2012 (r244524) @@ -118,26 +118,26 @@ struct ip6protosw { /* protocol-protocol hooks */ int (*pr_input) /* input to protocol (from below) */ - __P((struct mbuf **, int *, int)); + (struct mbuf **, int *, int); int (*pr_output) /* output to protocol (from above) */ - __P((struct mbuf *, ...)); + (struct mbuf *, ...); void (*pr_ctlinput) /* control input (from below) */ - __P((int, struct sockaddr *, void *)); + (int, struct sockaddr *, void *); int (*pr_ctloutput) /* control output (from above) */ - __P((struct socket *, struct sockopt *)); + (struct socket *, struct sockopt *); /* utility hooks */ void (*pr_init) /* initialization hook */ - __P((void)); + (void); void (*pr_destroy) /* cleanup hook */ - __P((void)); + (void); void (*pr_fasttimo) /* fast timeout (200ms) */ - __P((void)); + (void); void (*pr_slowtimo) /* slow timeout (500ms) */ - __P((void)); + (void); void (*pr_drain) /* flush any excess space possible */ - __P((void)); + (void); struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ }; Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/nd6.c Fri Dec 21 00:41:52 2012 (r244524) @@ -124,8 +124,8 @@ static struct sockaddr_in6 all1_sa; int (*send_sendso_input_hook)(struct mbuf *, struct ifnet *, int, int); -static int nd6_is_new_addr_neighbor __P((struct sockaddr_in6 *, - struct ifnet *)); +static int nd6_is_new_addr_neighbor(struct sockaddr_in6 *, + struct ifnet *); static void nd6_setmtu0(struct ifnet *, struct nd_ifinfo *); static void nd6_slowtimo(void *); static int regen_tmpaddr(struct in6_ifaddr *); Modified: stable/9/sys/netinet6/nd6.h ============================================================================== --- stable/9/sys/netinet6/nd6.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/nd6.h Fri Dec 21 00:41:52 2012 (r244524) @@ -384,68 +384,68 @@ union nd_opts { /* XXX: need nd6_var.h?? */ /* nd6.c */ -void nd6_init __P((void)); +void nd6_init(void); #ifdef VIMAGE -void nd6_destroy __P((void)); +void nd6_destroy(void); #endif -struct nd_ifinfo *nd6_ifattach __P((struct ifnet *)); -void nd6_ifdetach __P((struct nd_ifinfo *)); -int nd6_is_addr_neighbor __P((struct sockaddr_in6 *, struct ifnet *)); -void nd6_option_init __P((void *, int, union nd_opts *)); -struct nd_opt_hdr *nd6_option __P((union nd_opts *)); -int nd6_options __P((union nd_opts *)); -struct llentry *nd6_lookup __P((struct in6_addr *, int, struct ifnet *)); -void nd6_setmtu __P((struct ifnet *)); -void nd6_llinfo_settimer __P((struct llentry *, long)); -void nd6_llinfo_settimer_locked __P((struct llentry *, long)); -void nd6_timer __P((void *)); -void nd6_purge __P((struct ifnet *)); -void nd6_nud_hint __P((struct rtentry *, struct in6_addr *, int)); -int nd6_resolve __P((struct ifnet *, struct rtentry *, struct mbuf *, - struct sockaddr *, u_char *)); -void nd6_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *)); -int nd6_ioctl __P((u_long, caddr_t, struct ifnet *)); -struct llentry *nd6_cache_lladdr __P((struct ifnet *, struct in6_addr *, - char *, int, int, int)); -int nd6_output __P((struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *, struct rtentry *)); -int nd6_output_lle __P((struct ifnet *, struct ifnet *, struct mbuf *, +struct nd_ifinfo *nd6_ifattach(struct ifnet *); +void nd6_ifdetach(struct nd_ifinfo *); +int nd6_is_addr_neighbor(struct sockaddr_in6 *, struct ifnet *); +void nd6_option_init(void *, int, union nd_opts *); +struct nd_opt_hdr *nd6_option(union nd_opts *); +int nd6_options(union nd_opts *); +struct llentry *nd6_lookup(struct in6_addr *, int, struct ifnet *); +void nd6_setmtu(struct ifnet *); +void nd6_llinfo_settimer(struct llentry *, long); +void nd6_llinfo_settimer_locked(struct llentry *, long); +void nd6_timer(void *); +void nd6_purge(struct ifnet *); +void nd6_nud_hint(struct rtentry *, struct in6_addr *, int); +int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, + struct sockaddr *, u_char *); +void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); +int nd6_ioctl(u_long, caddr_t, struct ifnet *); +struct llentry *nd6_cache_lladdr(struct ifnet *, struct in6_addr *, + char *, int, int, int); +int nd6_output(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *, struct rtentry *); +int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct rtentry *, struct llentry *, - struct mbuf **)); -int nd6_output_flush __P((struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *, struct route *)); -int nd6_need_cache __P((struct ifnet *)); -int nd6_storelladdr __P((struct ifnet *, struct mbuf *, - struct sockaddr *, u_char *, struct llentry **)); + struct mbuf **); +int nd6_output_flush(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *, struct route *); +int nd6_need_cache(struct ifnet *); +int nd6_storelladdr(struct ifnet *, struct mbuf *, + struct sockaddr *, u_char *, struct llentry **); /* nd6_nbr.c */ -void nd6_na_input __P((struct mbuf *, int, int)); -void nd6_na_output __P((struct ifnet *, const struct in6_addr *, - const struct in6_addr *, u_long, int, struct sockaddr *)); -void nd6_ns_input __P((struct mbuf *, int, int)); -void nd6_ns_output __P((struct ifnet *, const struct in6_addr *, - const struct in6_addr *, struct llentry *, int)); -caddr_t nd6_ifptomac __P((struct ifnet *)); -void nd6_dad_start __P((struct ifaddr *, int)); -void nd6_dad_stop __P((struct ifaddr *)); -void nd6_dad_duplicated __P((struct ifaddr *)); +void nd6_na_input(struct mbuf *, int, int); +void nd6_na_output(struct ifnet *, const struct in6_addr *, + const struct in6_addr *, u_long, int, struct sockaddr *); +void nd6_ns_input(struct mbuf *, int, int); +void nd6_ns_output(struct ifnet *, const struct in6_addr *, + const struct in6_addr *, struct llentry *, int); +caddr_t nd6_ifptomac(struct ifnet *); +void nd6_dad_start(struct ifaddr *, int); +void nd6_dad_stop(struct ifaddr *); +void nd6_dad_duplicated(struct ifaddr *); /* nd6_rtr.c */ -void nd6_rs_input __P((struct mbuf *, int, int)); -void nd6_ra_input __P((struct mbuf *, int, int)); -void prelist_del __P((struct nd_prefix *)); -void defrouter_reset __P((void)); -void defrouter_select __P((void)); -void defrtrlist_del __P((struct nd_defrouter *)); -void prelist_remove __P((struct nd_prefix *)); -int nd6_prelist_add __P((struct nd_prefixctl *, struct nd_defrouter *, - struct nd_prefix **)); -void pfxlist_onlink_check __P((void)); -struct nd_defrouter *defrouter_lookup __P((struct in6_addr *, struct ifnet *)); -struct nd_prefix *nd6_prefix_lookup __P((struct nd_prefixctl *)); -void rt6_flush __P((struct in6_addr *, struct ifnet *)); -int nd6_setdefaultiface __P((int)); -int in6_tmpifadd __P((const struct in6_ifaddr *, int, int)); +void nd6_rs_input(struct mbuf *, int, int); +void nd6_ra_input(struct mbuf *, int, int); +void prelist_del(struct nd_prefix *); +void defrouter_reset(void); +void defrouter_select(void); +void defrtrlist_del(struct nd_defrouter *); +void prelist_remove(struct nd_prefix *); +int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *, + struct nd_prefix **); +void pfxlist_onlink_check(void); +struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *); +struct nd_prefix *nd6_prefix_lookup(struct nd_prefixctl *); +void rt6_flush(struct in6_addr *, struct ifnet *); +int nd6_setdefaultiface(int); +int in6_tmpifadd(const struct in6_ifaddr *, int, int); #endif /* _KERNEL */ Modified: stable/9/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/9/sys/netinet6/nd6_rtr.c Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/nd6_rtr.c Fri Dec 21 00:41:52 2012 (r244524) @@ -68,11 +68,11 @@ __FBSDID("$FreeBSD$"); static int rtpref(struct nd_defrouter *); static struct nd_defrouter *defrtrlist_update(struct nd_defrouter *); -static int prelist_update __P((struct nd_prefixctl *, struct nd_defrouter *, - struct mbuf *, int)); -static struct in6_ifaddr *in6_ifadd(struct nd_prefixctl *, int); -static struct nd_pfxrouter *pfxrtr_lookup __P((struct nd_prefix *, - struct nd_defrouter *)); +static int prelist_update(struct nd_prefixctl *, struct nd_defrouter *, + struct mbuf *, int); +static struct in6_ifaddr *in6_ifadd(struct nd_prefixctl *, int); +static struct nd_pfxrouter *pfxrtr_lookup(struct nd_prefix *, + struct nd_defrouter *); static void pfxrtr_add(struct nd_prefix *, struct nd_defrouter *); static void pfxrtr_del(struct nd_pfxrouter *); static struct nd_pfxrouter *find_pfxlist_reachable_router @@ -81,8 +81,8 @@ static void defrouter_delreq(struct nd_d static void nd6_rtmsg(int, struct rtentry *); static int in6_init_prefix_ltimes(struct nd_prefix *); -static void in6_init_address_ltimes __P((struct nd_prefix *, - struct in6_addrlifetime *)); +static void in6_init_address_ltimes(struct nd_prefix *, + struct in6_addrlifetime *); static int nd6_prefix_onlink(struct nd_prefix *); static int nd6_prefix_offlink(struct nd_prefix *); Modified: stable/9/sys/netinet6/pim6_var.h ============================================================================== --- stable/9/sys/netinet6/pim6_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/pim6_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -52,7 +52,7 @@ struct pim6stat { }; #if (defined(KERNEL)) || (defined(_KERNEL)) -int pim6_input __P((struct mbuf **, int*, int)); +int pim6_input(struct mbuf **, int*, int); #endif /* KERNEL */ /* Modified: stable/9/sys/netinet6/scope6_var.h ============================================================================== --- stable/9/sys/netinet6/scope6_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/scope6_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -42,18 +42,18 @@ struct scope6_id { u_int32_t s6id_list[16]; }; -void scope6_init __P((void)); -struct scope6_id *scope6_ifattach __P((struct ifnet *)); -void scope6_ifdetach __P((struct scope6_id *)); -int scope6_set __P((struct ifnet *, struct scope6_id *)); -int scope6_get __P((struct ifnet *, struct scope6_id *)); -void scope6_setdefault __P((struct ifnet *)); -int scope6_get_default __P((struct scope6_id *)); -u_int32_t scope6_addr2default __P((struct in6_addr *)); -int sa6_embedscope __P((struct sockaddr_in6 *, int)); -int sa6_recoverscope __P((struct sockaddr_in6 *)); -int in6_setscope __P((struct in6_addr *, struct ifnet *, u_int32_t *)); -int in6_clearscope __P((struct in6_addr *)); +void scope6_init(void); +struct scope6_id *scope6_ifattach(struct ifnet *); +void scope6_ifdetach(struct scope6_id *); +int scope6_set(struct ifnet *, struct scope6_id *); +int scope6_get(struct ifnet *, struct scope6_id *); +void scope6_setdefault(struct ifnet *); +int scope6_get_default(struct scope6_id *); +u_int32_t scope6_addr2default(struct in6_addr *); +int sa6_embedscope(struct sockaddr_in6 *, int); +int sa6_recoverscope(struct sockaddr_in6 *); +int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); +int in6_clearscope(struct in6_addr *); uint16_t in6_getscope(struct in6_addr *); #endif /* _KERNEL */ Modified: stable/9/sys/netinet6/sctp6_var.h ============================================================================== --- stable/9/sys/netinet6/sctp6_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/sctp6_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -42,11 +42,11 @@ SYSCTL_DECL(_net_inet6_sctp6); extern struct pr_usrreqs sctp6_usrreqs; -int sctp6_input __P((struct mbuf **, int *, int)); +int sctp6_input(struct mbuf **, int *, int); int sctp6_output -__P((struct sctp_inpcb *, struct mbuf *, struct sockaddr *, - struct mbuf *, struct proc *)); - void sctp6_ctlinput __P((int, struct sockaddr *, void *)); +(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, + struct mbuf *, struct proc *); + void sctp6_ctlinput(int, struct sockaddr *, void *); extern void sctp6_notify(struct sctp_inpcb *inp, Modified: stable/9/sys/netinet6/tcp6_var.h ============================================================================== --- stable/9/sys/netinet6/tcp6_var.h Thu Dec 20 23:21:20 2012 (r244523) +++ stable/9/sys/netinet6/tcp6_var.h Fri Dec 21 00:41:52 2012 (r244524) @@ -71,9 +71,9 @@ VNET_DECLARE(int, tcp_v6mssdflt); /* XXX #endif struct ip6_hdr; -void tcp6_ctlinput __P((int, struct sockaddr *, void *)); -void tcp6_init __P((void)); -int tcp6_input __P((struct mbuf **, int *, int)); +void tcp6_ctlinput(int, struct sockaddr *, void *); +void tcp6_init(void); +int tcp6_input(struct mbuf **, int *, int); struct rtentry *tcp_rtlookup6(struct in_conninfo *); extern struct pr_usrreqs tcp6_usrreqs; From owner-svn-src-stable@FreeBSD.ORG Fri Dec 21 18:25:08 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC5ED53E; Fri, 21 Dec 2012 18:25:08 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8DAB28FC13; Fri, 21 Dec 2012 18:25:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBLIP855012701; Fri, 21 Dec 2012 18:25:08 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBLIP5Fr012680; Fri, 21 Dec 2012 18:25:05 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201212211825.qBLIP5Fr012680@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 21 Dec 2012 18:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244547 - in stable/9/sys: dev/fdc geom geom/bde geom/cache geom/label geom/mountver geom/multipath geom/nop geom/sched vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 18:25:08 -0000 Author: jh Date: Fri Dec 21 18:25:05 2012 New Revision: 244547 URL: http://svnweb.freebsd.org/changeset/base/244547 Log: MFC r243333: - Don't pass geom and provider names as format strings. - Add __printflike() attributes. - Remove an extra argument for the g_new_geomf() call in swapongeom_ev(). Modified: stable/9/sys/dev/fdc/fdc.c stable/9/sys/geom/bde/g_bde.c stable/9/sys/geom/cache/g_cache.c stable/9/sys/geom/geom.h stable/9/sys/geom/geom_aes.c stable/9/sys/geom/geom_dev.c stable/9/sys/geom/geom_mbr.c stable/9/sys/geom/geom_slice.c stable/9/sys/geom/geom_slice.h stable/9/sys/geom/label/g_label.c stable/9/sys/geom/mountver/g_mountver.c stable/9/sys/geom/multipath/g_multipath.c stable/9/sys/geom/nop/g_nop.c stable/9/sys/geom/sched/g_sched.c stable/9/sys/vm/swap_pager.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/fdc/fdc.c ============================================================================== --- stable/9/sys/dev/fdc/fdc.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/dev/fdc/fdc.c Fri Dec 21 18:25:05 2012 (r244547) @@ -865,7 +865,7 @@ fdc_worker(struct fdc_data *fdc) g_orphan_provider(fd->fd_provider, ENXIO); fd->fd_provider->flags |= G_PF_WITHER; fd->fd_provider = - g_new_providerf(fd->fd_geom, fd->fd_geom->name); + g_new_providerf(fd->fd_geom, "%s", fd->fd_geom->name); g_error_provider(fd->fd_provider, 0); g_topology_unlock(); return (fdc_biodone(fdc, ENXIO)); @@ -2011,7 +2011,7 @@ fd_attach2(void *arg, int flag) fd->fd_geom = g_new_geomf(&g_fd_class, "fd%d", device_get_unit(fd->dev)); - fd->fd_provider = g_new_providerf(fd->fd_geom, fd->fd_geom->name); + fd->fd_provider = g_new_providerf(fd->fd_geom, "%s", fd->fd_geom->name); fd->fd_geom->softc = fd; g_error_provider(fd->fd_provider, 0); } Modified: stable/9/sys/geom/bde/g_bde.c ============================================================================== --- stable/9/sys/geom/bde/g_bde.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/bde/g_bde.c Fri Dec 21 18:25:05 2012 (r244547) @@ -188,7 +188,7 @@ g_bde_create_geom(struct gctl_req *req, /* XXX: error check */ kproc_create(g_bde_worker, gp, &sc->thread, 0, 0, "g_bde %s", gp->name); - pp = g_new_providerf(gp, gp->name); + pp = g_new_providerf(gp, "%s", gp->name); #if 0 /* * XXX: Disable this for now. Appearantly UFS no longer Modified: stable/9/sys/geom/cache/g_cache.c ============================================================================== --- stable/9/sys/geom/cache/g_cache.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/cache/g_cache.c Fri Dec 21 18:25:05 2012 (r244547) @@ -501,7 +501,7 @@ g_cache_create(struct g_class *mp, struc return (NULL); } - gp = g_new_geomf(mp, md->md_name); + gp = g_new_geomf(mp, "%s", md->md_name); sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_type = type; sc->sc_bshift = bshift; Modified: stable/9/sys/geom/geom.h ============================================================================== --- stable/9/sys/geom/geom.h Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/geom.h Fri Dec 21 18:25:05 2012 (r244547) @@ -263,8 +263,10 @@ int g_handleattr_int(struct bio *bp, con int g_handleattr_off_t(struct bio *bp, const char *attribute, off_t val); int g_handleattr_str(struct bio *bp, const char *attribute, const char *str); struct g_consumer * g_new_consumer(struct g_geom *gp); -struct g_geom * g_new_geomf(struct g_class *mp, const char *fmt, ...); -struct g_provider * g_new_providerf(struct g_geom *gp, const char *fmt, ...); +struct g_geom * g_new_geomf(struct g_class *mp, const char *fmt, ...) + __printflike(2, 3); +struct g_provider * g_new_providerf(struct g_geom *gp, const char *fmt, ...) + __printflike(2, 3); int g_retaste(struct g_class *mp); void g_spoil(struct g_provider *pp, struct g_consumer *cp); int g_std_access(struct g_provider *pp, int dr, int dw, int de); Modified: stable/9/sys/geom/geom_aes.c ============================================================================== --- stable/9/sys/geom/geom_aes.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/geom_aes.c Fri Dec 21 18:25:05 2012 (r244547) @@ -344,7 +344,7 @@ g_aes_taste(struct g_class *mp, struct g } } g_topology_lock(); - pp = g_new_providerf(gp, gp->name); + pp = g_new_providerf(gp, "%s", gp->name); pp->mediasize = mediasize - sectorsize; pp->sectorsize = sectorsize; g_error_provider(pp, 0); Modified: stable/9/sys/geom/geom_dev.c ============================================================================== --- stable/9/sys/geom/geom_dev.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/geom_dev.c Fri Dec 21 18:25:05 2012 (r244547) @@ -164,7 +164,7 @@ g_dev_taste(struct g_class *mp, struct g LIST_FOREACH(cp, &pp->consumers, consumers) if (cp->geom->class == mp) return (NULL); - gp = g_new_geomf(mp, pp->name); + gp = g_new_geomf(mp, "%s", pp->name); cp = g_new_consumer(gp); error = g_attach(cp, pp); KASSERT(error == 0, Modified: stable/9/sys/geom/geom_mbr.c ============================================================================== --- stable/9/sys/geom/geom_mbr.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/geom_mbr.c Fri Dec 21 18:25:05 2012 (r244547) @@ -483,8 +483,8 @@ g_mbrext_taste(struct g_class *mp, struc ((off_t)dp[0].dp_size) << 9ULL, sectorsize, "%*.*s%d", - strlen(gp->name) - 1, - strlen(gp->name) - 1, + (int)strlen(gp->name) - 1, + (int)strlen(gp->name) - 1, gp->name, slice + 5); g_topology_unlock(); Modified: stable/9/sys/geom/geom_slice.c ============================================================================== --- stable/9/sys/geom/geom_slice.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/geom_slice.c Fri Dec 21 18:25:05 2012 (r244547) @@ -390,7 +390,7 @@ g_slice_config(struct g_geom *gp, u_int sbuf_vprintf(sb, fmt, ap); va_end(ap); sbuf_finish(sb); - pp = g_new_providerf(gp, sbuf_data(sb)); + pp = g_new_providerf(gp, "%s", sbuf_data(sb)); pp2 = LIST_FIRST(&gp->consumer)->provider; pp->flags = pp2->flags & G_PF_CANDELETE; pp->stripesize = pp2->stripesize; Modified: stable/9/sys/geom/geom_slice.h ============================================================================== --- stable/9/sys/geom/geom_slice.h Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/geom_slice.h Fri Dec 21 18:25:05 2012 (r244547) @@ -69,7 +69,7 @@ struct g_slicer { }; g_dumpconf_t g_slice_dumpconf; -int g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length, u_int sectorsize, const char *fmt, ...); +int g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length, u_int sectorsize, const char *fmt, ...) __printflike(7, 8); void g_slice_spoiled(struct g_consumer *cp); void g_slice_orphan(struct g_consumer *cp); #define G_SLICE_CONFIG_CHECK 0 Modified: stable/9/sys/geom/label/g_label.c ============================================================================== --- stable/9/sys/geom/label/g_label.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/label/g_label.c Fri Dec 21 18:25:05 2012 (r244547) @@ -187,7 +187,7 @@ g_label_create(struct gctl_req *req, str gp->spoiled = g_label_spoiled; g_access(cp, -1, 0, 0); g_slice_config(gp, 0, G_SLICE_CONFIG_SET, (off_t)0, mediasize, - pp->sectorsize, name); + pp->sectorsize, "%s", name); G_LABEL_DEBUG(1, "Label for provider %s is %s.", pp->name, name); return (gp); } Modified: stable/9/sys/geom/mountver/g_mountver.c ============================================================================== --- stable/9/sys/geom/mountver/g_mountver.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/mountver/g_mountver.c Fri Dec 21 18:25:05 2012 (r244547) @@ -249,7 +249,7 @@ g_mountver_create(struct gctl_req *req, return (EEXIST); } } - gp = g_new_geomf(mp, name); + gp = g_new_geomf(mp, "%s", name); sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); mtx_init(&sc->sc_mtx, "gmountver", NULL, MTX_DEF); TAILQ_INIT(&sc->sc_queue); @@ -260,7 +260,7 @@ g_mountver_create(struct gctl_req *req, gp->access = g_mountver_access; gp->dumpconf = g_mountver_dumpconf; - newpp = g_new_providerf(gp, gp->name); + newpp = g_new_providerf(gp, "%s", gp->name); newpp->mediasize = pp->mediasize; newpp->sectorsize = pp->sectorsize; Modified: stable/9/sys/geom/multipath/g_multipath.c ============================================================================== --- stable/9/sys/geom/multipath/g_multipath.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/multipath/g_multipath.c Fri Dec 21 18:25:05 2012 (r244547) @@ -429,7 +429,7 @@ g_multipath_create(struct g_class *mp, s } } - gp = g_new_geomf(mp, md->md_name); + gp = g_new_geomf(mp, "%s", md->md_name); sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); mtx_init(&sc->sc_mtx, "multipath", NULL, MTX_DEF); memcpy(sc->sc_uuid, md->md_uuid, sizeof (sc->sc_uuid)); Modified: stable/9/sys/geom/nop/g_nop.c ============================================================================== --- stable/9/sys/geom/nop/g_nop.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/nop/g_nop.c Fri Dec 21 18:25:05 2012 (r244547) @@ -189,7 +189,7 @@ g_nop_create(struct gctl_req *req, struc return (EEXIST); } } - gp = g_new_geomf(mp, name); + gp = g_new_geomf(mp, "%s", name); sc = g_malloc(sizeof(*sc), M_WAITOK); sc->sc_offset = offset; sc->sc_error = ioerror; @@ -205,7 +205,7 @@ g_nop_create(struct gctl_req *req, struc gp->access = g_nop_access; gp->dumpconf = g_nop_dumpconf; - newpp = g_new_providerf(gp, gp->name); + newpp = g_new_providerf(gp, "%s", gp->name); newpp->mediasize = size; newpp->sectorsize = secsize; Modified: stable/9/sys/geom/sched/g_sched.c ============================================================================== --- stable/9/sys/geom/sched/g_sched.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/geom/sched/g_sched.c Fri Dec 21 18:25:05 2012 (r244547) @@ -1003,7 +1003,7 @@ g_sched_create(struct gctl_req *req, str } } - gp = g_new_geomf(mp, name); + gp = g_new_geomf(mp, "%s", name); dstgp = proxy ? pp->geom : gp; /* where do we link the provider */ sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); @@ -1029,7 +1029,7 @@ g_sched_create(struct gctl_req *req, str gp->access = g_sched_access; gp->dumpconf = g_sched_dumpconf; - newpp = g_new_providerf(dstgp, gp->name); + newpp = g_new_providerf(dstgp, "%s", gp->name); newpp->mediasize = pp->mediasize; newpp->sectorsize = pp->sectorsize; Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Fri Dec 21 18:00:11 2012 (r244546) +++ stable/9/sys/vm/swap_pager.c Fri Dec 21 18:25:05 2012 (r244547) @@ -2612,7 +2612,7 @@ swapongeom_ev(void *arg, int flags) } mtx_unlock(&sw_dev_mtx); if (gp == NULL) - gp = g_new_geomf(&g_swap_class, "swap", NULL); + gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); g_attach(cp, pp); /* From owner-svn-src-stable@FreeBSD.ORG Fri Dec 21 21:40:52 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4C3375E; Fri, 21 Dec 2012 21:40:52 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86C638FC19; Fri, 21 Dec 2012 21:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBLLeqfQ043504; Fri, 21 Dec 2012 21:40:52 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBLLeqpU043503; Fri, 21 Dec 2012 21:40:52 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201212212140.qBLLeqpU043503@svn.freebsd.org> From: Mateusz Guzik Date: Fri, 21 Dec 2012 21:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244566 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 21:40:52 -0000 Author: mjg Date: Fri Dec 21 21:40:51 2012 New Revision: 244566 URL: http://svnweb.freebsd.org/changeset/base/244566 Log: MFC r244404: prison_racct_detach can be called for not fully initialized jail, so make it check that the jail has racct before doing anything PR: kern/174436 Modified: stable/9/sys/kern/kern_jail.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Fri Dec 21 21:33:47 2012 (r244565) +++ stable/9/sys/kern/kern_jail.c Fri Dec 21 21:40:51 2012 (r244566) @@ -4533,6 +4533,8 @@ prison_racct_detach(struct prison *pr) sx_assert(&allprison_lock, SA_UNLOCKED); + if (pr->pr_prison_racct == NULL) + return; prison_racct_free(pr->pr_prison_racct); pr->pr_prison_racct = NULL; } From owner-svn-src-stable@FreeBSD.ORG Fri Dec 21 22:48:13 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 820B19C1; Fri, 21 Dec 2012 22:48:13 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8148FC0C; Fri, 21 Dec 2012 22:48:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBLMmDIY053572; Fri, 21 Dec 2012 22:48:13 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBLMmCuN053570; Fri, 21 Dec 2012 22:48:12 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201212212248.qBLMmCuN053570@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Fri, 21 Dec 2012 22:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244569 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 22:48:13 -0000 Author: melifaro Date: Fri Dec 21 22:48:12 2012 New Revision: 244569 URL: http://svnweb.freebsd.org/changeset/base/244569 Log: Merge r241908, r242632 Remove unnecessary chain read lock in ipfw nat 'global' code. Document case when ipfw chain lock must be held while calling ipfw_nat(). Modified: stable/9/sys/netpfil/ipfw/ip_fw_nat.c stable/9/sys/netpfil/ipfw/ip_fw_private.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_nat.c Fri Dec 21 22:20:59 2012 (r244568) +++ stable/9/sys/netpfil/ipfw/ip_fw_nat.c Fri Dec 21 22:48:12 2012 (r244569) @@ -202,6 +202,13 @@ add_redir_spool_cfg(char *buf, struct cf } } +/* + * ipfw_nat - perform mbuf header translation. + * + * Note V_layer3_chain has to be locked while calling ipfw_nat() in + * 'global' operation mode (t == NULL). + * + */ static int ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) { @@ -269,7 +276,7 @@ ipfw_nat(struct ip_fw_args *args, struct found = 0; chain = &V_layer3_chain; - IPFW_RLOCK(chain); + IPFW_RLOCK_ASSERT(chain); /* Check every nat entry... */ LIST_FOREACH(t, &chain->nat, _next) { if ((t->mode & PKT_ALIAS_SKIP_GLOBAL) != 0) @@ -282,7 +289,6 @@ ipfw_nat(struct ip_fw_args *args, struct break; } } - IPFW_RUNLOCK(chain); if (found != 1) { /* No instance found, return ignore */ args->m = mcl; Modified: stable/9/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_private.h Fri Dec 21 22:20:59 2012 (r244568) +++ stable/9/sys/netpfil/ipfw/ip_fw_private.h Fri Dec 21 22:48:12 2012 (r244569) @@ -251,6 +251,7 @@ struct sockopt; /* used by tcp_var.h */ rw_destroy(&(_chain)->uh_lock); \ } while (0) +#define IPFW_RLOCK_ASSERT(_chain) rw_assert(&(_chain)->rwmtx, RA_RLOCKED) #define IPFW_WLOCK_ASSERT(_chain) rw_assert(&(_chain)->rwmtx, RA_WLOCKED) #define IPFW_RLOCK(p) rw_rlock(&(p)->rwmtx) From owner-svn-src-stable@FreeBSD.ORG Fri Dec 21 23:47:22 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D37EC467; Fri, 21 Dec 2012 23:47:22 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B4BEF8FC0C; Fri, 21 Dec 2012 23:47:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBLNlMhe063948; Fri, 21 Dec 2012 23:47:22 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBLNlMXI063945; Fri, 21 Dec 2012 23:47:22 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201212212347.qBLNlMXI063945@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Fri, 21 Dec 2012 23:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244571 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2012 23:47:22 -0000 Author: melifaro Date: Fri Dec 21 23:47:22 2012 New Revision: 244571 URL: http://svnweb.freebsd.org/changeset/base/244571 Log: Merge r238978(approved by luigi), r242631, r242834, r243707 replace inet_ntoa_r with the more standard inet_ntop(). As discussed on -current, inet_ntoa_r() is non standard, has different arguments in userspace and kernel, and almost unused (no clients in userspace, only net/flowtable.c, net/if_llatbl.c, netinet/in_pcb.c, netinet/tcp_subr.c in the kernel) Use unified print_dyn_rule_flags() function for debugging messages instead of hand-made printfs in every place. Simplify sending keepalives. Prepare ipfw_tick() to be used by other consumers. Make ipfw dynamic states operations SMP-ready. * Global IPFW_DYN_LOCK() is changed to per-bucket mutex. * State expiration is done in ipfw_tick every second. * No expiration is done on forwarding path. * hash table resize is done automatically and does not flush all states. * Dynamic UMA zone is now allocated per each VNET * State limiting is now done via UMA(9) api. Modified: stable/9/sys/netpfil/ipfw/ip_fw2.c stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c stable/9/sys/netpfil/ipfw/ip_fw_log.c stable/9/sys/netpfil/ipfw/ip_fw_private.h stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw2.c Fri Dec 21 23:12:34 2012 (r244570) +++ stable/9/sys/netpfil/ipfw/ip_fw2.c Fri Dec 21 23:47:22 2012 (r244571) @@ -2038,7 +2038,7 @@ do { \ f->rulenum, f->id); cmd = ACTION_PTR(f); l = f->cmd_len - f->act_ofs; - ipfw_dyn_unlock(); + ipfw_dyn_unlock(q); cmdlen = 0; match = 1; break; @@ -2523,7 +2523,6 @@ ipfw_init(void) { int error = 0; - ipfw_dyn_attach(); /* * Only print out this stuff the first time around, * when called from the sysinit code. @@ -2577,7 +2576,6 @@ ipfw_destroy(void) { ipfw_log_bpf(0); /* uninit */ - ipfw_dyn_detach(); printf("IP firewall unloaded\n"); } @@ -2635,7 +2633,7 @@ vnet_ipfw_init(const void *unused) chain->id = rule->id = 1; IPFW_LOCK_INIT(chain); - ipfw_dyn_init(); + ipfw_dyn_init(chain); /* First set up some values that are compile time options */ V_ipfw_vnet_ready = 1; /* Open for business */ Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Dec 21 23:12:34 2012 (r244570) +++ stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Dec 21 23:47:22 2012 (r244571) @@ -95,7 +95,7 @@ __FBSDID("$FreeBSD$"); * The lifetime of dynamic rules is regulated by dyn_*_lifetime, * measured in seconds and depending on the flags. * - * The total number of dynamic rules is stored in dyn_count. + * The total number of dynamic rules is equal to UMA zone items count. * The max number of dynamic rules is dyn_max. When we reach * the maximum number of rules we do not create anymore. This is * done to avoid consuming too much memory, but also too much @@ -111,37 +111,33 @@ __FBSDID("$FreeBSD$"); * passes through the firewall. XXX check the latter!!! */ +struct ipfw_dyn_bucket { + struct mtx mtx; /* Bucket protecting lock */ + ipfw_dyn_rule *head; /* Pointer to first rule */ +}; + /* * Static variables followed by global ones */ -static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); -static VNET_DEFINE(u_int32_t, dyn_buckets); +static VNET_DEFINE(struct ipfw_dyn_bucket *, ipfw_dyn_v); +static VNET_DEFINE(u_int32_t, dyn_buckets_max); static VNET_DEFINE(u_int32_t, curr_dyn_buckets); static VNET_DEFINE(struct callout, ipfw_timeout); #define V_ipfw_dyn_v VNET(ipfw_dyn_v) -#define V_dyn_buckets VNET(dyn_buckets) +#define V_dyn_buckets_max VNET(dyn_buckets_max) #define V_curr_dyn_buckets VNET(curr_dyn_buckets) #define V_ipfw_timeout VNET(ipfw_timeout) -static uma_zone_t ipfw_dyn_rule_zone; -#ifndef __FreeBSD__ -DEFINE_SPINLOCK(ipfw_dyn_mtx); -#else -static struct mtx ipfw_dyn_mtx; /* mutex guarding dynamic rules */ -#endif +static VNET_DEFINE(uma_zone_t, ipfw_dyn_rule_zone); +#define V_ipfw_dyn_rule_zone VNET(ipfw_dyn_rule_zone) -#define IPFW_DYN_LOCK_INIT() \ - mtx_init(&ipfw_dyn_mtx, "IPFW dynamic rules", NULL, MTX_DEF) -#define IPFW_DYN_LOCK_DESTROY() mtx_destroy(&ipfw_dyn_mtx) -#define IPFW_DYN_LOCK() mtx_lock(&ipfw_dyn_mtx) -#define IPFW_DYN_UNLOCK() mtx_unlock(&ipfw_dyn_mtx) -#define IPFW_DYN_LOCK_ASSERT() mtx_assert(&ipfw_dyn_mtx, MA_OWNED) - -void -ipfw_dyn_unlock(void) -{ - IPFW_DYN_UNLOCK(); -} +#define IPFW_BUCK_LOCK_INIT(b) \ + mtx_init(&(b)->mtx, "IPFW dynamic bucket", NULL, MTX_DEF) +#define IPFW_BUCK_LOCK_DESTROY(b) \ + mtx_destroy(&(b)->mtx) +#define IPFW_BUCK_LOCK(i) mtx_lock(&V_ipfw_dyn_v[(i)].mtx) +#define IPFW_BUCK_UNLOCK(i) mtx_unlock(&V_ipfw_dyn_v[(i)].mtx) +#define IPFW_BUCK_ASSERT(i) mtx_assert(&V_ipfw_dyn_v[(i)].mtx, MA_OWNED) /* * Timeouts for various events in handing dynamic rules. @@ -171,33 +167,42 @@ static VNET_DEFINE(u_int32_t, dyn_short_ static VNET_DEFINE(u_int32_t, dyn_keepalive_interval); static VNET_DEFINE(u_int32_t, dyn_keepalive_period); static VNET_DEFINE(u_int32_t, dyn_keepalive); +static VNET_DEFINE(time_t, dyn_keepalive_last); #define V_dyn_keepalive_interval VNET(dyn_keepalive_interval) #define V_dyn_keepalive_period VNET(dyn_keepalive_period) #define V_dyn_keepalive VNET(dyn_keepalive) +#define V_dyn_keepalive_last VNET(dyn_keepalive_last) -static VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ static VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ -#define V_dyn_count VNET(dyn_count) +#define DYN_COUNT uma_zone_get_cur(V_ipfw_dyn_rule_zone) #define V_dyn_max VNET(dyn_max) +static int last_log; /* Log ratelimiting */ + +static void ipfw_dyn_tick(void *vnetx); +static void check_dyn_rules(struct ip_fw_chain *, struct ip_fw *, + int, int, int); #ifdef SYSCTL_NODE +static int sysctl_ipfw_dyn_count(SYSCTL_HANDLER_ARGS); +static int sysctl_ipfw_dyn_max(SYSCTL_HANDLER_ARGS); + SYSBEGIN(f2) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, - CTLFLAG_RW, &VNET_NAME(dyn_buckets), 0, - "Number of dyn. buckets"); + CTLFLAG_RW, &VNET_NAME(dyn_buckets_max), 0, + "Max number of dyn. buckets"); SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, curr_dyn_buckets, CTLFLAG_RD, &VNET_NAME(curr_dyn_buckets), 0, "Current Number of dyn. buckets"); -SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_count, - CTLFLAG_RD, &VNET_NAME(dyn_count), 0, +SYSCTL_VNET_PROC(_net_inet_ip_fw, OID_AUTO, dyn_count, + CTLTYPE_UINT|CTLFLAG_RD, 0, 0, sysctl_ipfw_dyn_count, "IU", "Number of dyn. rules"); -SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_max, - CTLFLAG_RW, &VNET_NAME(dyn_max), 0, +SYSCTL_VNET_PROC(_net_inet_ip_fw, OID_AUTO, dyn_max, + CTLTYPE_UINT|CTLFLAG_RW, 0, 0, sysctl_ipfw_dyn_max, "IU", "Max number of dyn. rules"); SYSCTL_VNET_UINT(_net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime, CTLFLAG_RW, &VNET_NAME(dyn_ack_lifetime), 0, @@ -244,7 +249,7 @@ hash_packet6(struct ipfw_flow_id *id) * and we want to find both in the same bucket. */ static __inline int -hash_packet(struct ipfw_flow_id *id) +hash_packet(struct ipfw_flow_id *id, int buckets) { u_int32_t i; @@ -254,12 +259,16 @@ hash_packet(struct ipfw_flow_id *id) else #endif /* INET6 */ i = (id->dst_ip) ^ (id->src_ip) ^ (id->dst_port) ^ (id->src_port); - i &= (V_curr_dyn_buckets - 1); + i &= (buckets - 1); return i; } -static __inline void -unlink_dyn_rule_print(struct ipfw_flow_id *id) +/** + * Print customizable flow id description via log(9) facility. + */ +static void +print_dyn_rule_flags(struct ipfw_flow_id *id, int dyn_type, int log_flags, + char *prefix, char *postfix) { struct in_addr da; #ifdef INET6 @@ -276,126 +285,25 @@ unlink_dyn_rule_print(struct ipfw_flow_i #endif { da.s_addr = htonl(id->src_ip); - inet_ntoa_r(da, src); + inet_ntop(AF_INET, &da, src, sizeof(src)); da.s_addr = htonl(id->dst_ip); - inet_ntoa_r(da, dst); + inet_ntop(AF_INET, &da, dst, sizeof(dst)); } - printf("ipfw: unlink entry %s %d -> %s %d, %d left\n", - src, id->src_port, dst, id->dst_port, V_dyn_count - 1); + log(log_flags, "ipfw: %s type %d %s %d -> %s %d, %d %s\n", + prefix, dyn_type, src, id->src_port, dst, + id->dst_port, DYN_COUNT, postfix); } -/** - * unlink a dynamic rule from a chain. prev is a pointer to - * the previous one, q is a pointer to the rule to delete, - * head is a pointer to the head of the queue. - * Modifies q and potentially also head. - */ -#define UNLINK_DYN_RULE(prev, head, q) { \ - ipfw_dyn_rule *old_q = q; \ - \ - /* remove a refcount to the parent */ \ - if (q->dyn_type == O_LIMIT) \ - q->parent->count--; \ - DEB(unlink_dyn_rule_print(&q->id);) \ - if (prev != NULL) \ - prev->next = q = q->next; \ - else \ - head = q = q->next; \ - V_dyn_count--; \ - uma_zfree(ipfw_dyn_rule_zone, old_q); } +#define print_dyn_rule(id, dtype, prefix, postfix) \ + print_dyn_rule_flags(id, dtype, LOG_DEBUG, prefix, postfix) #define TIME_LEQ(a,b) ((int)((a)-(b)) <= 0) -/** - * Remove dynamic rules pointing to "rule", or all of them if rule == NULL. - * - * If keep_me == NULL, rules are deleted even if not expired, - * otherwise only expired rules are removed. - * - * The value of the second parameter is also used to point to identify - * a rule we absolutely do not want to remove (e.g. because we are - * holding a reference to it -- this is the case with O_LIMIT_PARENT - * rules). The pointer is only used for comparison, so any non-null - * value will do. - */ -static void -remove_dyn_rule(struct ip_fw *rule, ipfw_dyn_rule *keep_me) -{ - static u_int32_t last_remove = 0; - -#define FORCE (keep_me == NULL) - - ipfw_dyn_rule *prev, *q; - int i, pass = 0, max_pass = 0; - - IPFW_DYN_LOCK_ASSERT(); - - if (V_ipfw_dyn_v == NULL || V_dyn_count == 0) - return; - /* do not expire more than once per second, it is useless */ - if (!FORCE && last_remove == time_uptime) - return; - last_remove = time_uptime; - - /* - * because O_LIMIT refer to parent rules, during the first pass only - * remove child and mark any pending LIMIT_PARENT, and remove - * them in a second pass. - */ -next_pass: - for (i = 0 ; i < V_curr_dyn_buckets ; i++) { - for (prev=NULL, q = V_ipfw_dyn_v[i] ; q ; ) { - /* - * Logic can become complex here, so we split tests. - */ - if (q == keep_me) - goto next; - if (rule != NULL && rule != q->rule) - goto next; /* not the one we are looking for */ - if (q->dyn_type == O_LIMIT_PARENT) { - /* - * handle parent in the second pass, - * record we need one. - */ - max_pass = 1; - if (pass == 0) - goto next; - if (FORCE && q->count != 0 ) { - /* XXX should not happen! */ - printf("ipfw: OUCH! cannot remove rule," - " count %d\n", q->count); - } - } else { - if (!FORCE && - !TIME_LEQ( q->expire, time_uptime )) - goto next; - } - if (q->dyn_type != O_LIMIT_PARENT || !q->count) { - UNLINK_DYN_RULE(prev, V_ipfw_dyn_v[i], q); - continue; - } -next: - prev=q; - q=q->next; - } - } - if (pass++ < max_pass) - goto next_pass; -} - -void -ipfw_remove_dyn_children(struct ip_fw *rule) -{ - IPFW_DYN_LOCK(); - remove_dyn_rule(rule, NULL /* force removal */); - IPFW_DYN_UNLOCK(); -} - /* * Lookup a dynamic rule, locked version. */ static ipfw_dyn_rule * -lookup_dyn_rule_locked(struct ipfw_flow_id *pkt, int *match_direction, +lookup_dyn_rule_locked(struct ipfw_flow_id *pkt, int i, int *match_direction, struct tcphdr *tcp) { /* @@ -406,23 +314,17 @@ lookup_dyn_rule_locked(struct ipfw_flow_ #define MATCH_FORWARD 1 #define MATCH_NONE 2 #define MATCH_UNKNOWN 3 - int i, dir = MATCH_NONE; + int dir = MATCH_NONE; ipfw_dyn_rule *prev, *q = NULL; - IPFW_DYN_LOCK_ASSERT(); + IPFW_BUCK_ASSERT(i); - if (V_ipfw_dyn_v == NULL) - goto done; /* not found */ - i = hash_packet(pkt); - for (prev = NULL, q = V_ipfw_dyn_v[i]; q != NULL;) { + for (prev = NULL, q = V_ipfw_dyn_v[i].head; q; prev = q, q = q->next) { if (q->dyn_type == O_LIMIT_PARENT && q->count) - goto next; - if (TIME_LEQ(q->expire, time_uptime)) { /* expire entry */ - UNLINK_DYN_RULE(prev, V_ipfw_dyn_v[i], q); continue; - } + if (pkt->proto != q->id.proto || q->dyn_type == O_LIMIT_PARENT) - goto next; + continue; if (IS_IP6_FLOW_ID(pkt)) { if (IN6_ARE_ADDR_EQUAL(&pkt->src_ip6, &q->id.src_ip6) && @@ -455,17 +357,14 @@ lookup_dyn_rule_locked(struct ipfw_flow_ break; } } -next: - prev = q; - q = q->next; } if (q == NULL) goto done; /* q = NULL, not found */ if (prev != NULL) { /* found and not in front */ prev->next = q->next; - q->next = V_ipfw_dyn_v[i]; - V_ipfw_dyn_v[i] = q; + q->next = V_ipfw_dyn_v[i].head; + V_ipfw_dyn_v[i].head = q; } if (pkt->proto == IPPROTO_TCP) { /* update state according to flags */ uint32_t ack; @@ -548,42 +447,108 @@ ipfw_lookup_dyn_rule(struct ipfw_flow_id struct tcphdr *tcp) { ipfw_dyn_rule *q; + int i; + + i = hash_packet(pkt, V_curr_dyn_buckets); - IPFW_DYN_LOCK(); - q = lookup_dyn_rule_locked(pkt, match_direction, tcp); + IPFW_BUCK_LOCK(i); + q = lookup_dyn_rule_locked(pkt, i, match_direction, tcp); if (q == NULL) - IPFW_DYN_UNLOCK(); + IPFW_BUCK_UNLOCK(i); /* NB: return table locked when q is not NULL */ return q; } -static void -realloc_dynamic_table(void) +/* + * Unlock bucket mtx + * @p - pointer to dynamic rule + */ +void +ipfw_dyn_unlock(ipfw_dyn_rule *q) { - IPFW_DYN_LOCK_ASSERT(); + + IPFW_BUCK_UNLOCK(q->bucket); +} + +static int +resize_dynamic_table(struct ip_fw_chain *chain, int nbuckets) +{ + int i, k, nbuckets_old; + ipfw_dyn_rule *q; + struct ipfw_dyn_bucket *dyn_v, *dyn_v_old; + + /* Check if given number is power of 2 and less than 64k */ + if ((nbuckets > 65536) || (!powerof2(nbuckets))) + return 1; + + CTR3(KTR_NET, "%s: resize dynamic hash: %d -> %d", __func__, + V_curr_dyn_buckets, nbuckets); + + /* Allocate and initialize new hash */ + dyn_v = malloc(nbuckets * sizeof(ipfw_dyn_rule), M_IPFW, + M_WAITOK | M_ZERO); + + for (i = 0 ; i < nbuckets; i++) + IPFW_BUCK_LOCK_INIT(&dyn_v[i]); /* - * Try reallocation, make sure we have a power of 2 and do - * not allow more than 64k entries. In case of overflow, - * default to 1024. + * Call upper half lock, as get_map() do to ease + * read-only access to dynamic rules hash from sysctl */ + IPFW_UH_WLOCK(chain); - if (V_dyn_buckets > 65536) - V_dyn_buckets = 1024; - if ((V_dyn_buckets & (V_dyn_buckets-1)) != 0) { /* not a power of 2 */ - V_dyn_buckets = V_curr_dyn_buckets; /* reset */ - return; + /* + * Acquire chain write lock to permit hash access + * for main traffic path without additional locks + */ + IPFW_WLOCK(chain); + + /* Save old values */ + nbuckets_old = V_curr_dyn_buckets; + dyn_v_old = V_ipfw_dyn_v; + + /* Skip relinking if array is not set up */ + if (V_ipfw_dyn_v == NULL) + V_curr_dyn_buckets = 0; + + /* Re-link all dynamic states */ + for (i = 0 ; i < V_curr_dyn_buckets ; i++) { + while (V_ipfw_dyn_v[i].head != NULL) { + /* Remove from current chain */ + q = V_ipfw_dyn_v[i].head; + V_ipfw_dyn_v[i].head = q->next; + + /* Get new hash value */ + k = hash_packet(&q->id, nbuckets); + q->bucket = k; + /* Add to the new head */ + q->next = dyn_v[k].head; + dyn_v[k].head = q; + } } - V_curr_dyn_buckets = V_dyn_buckets; - if (V_ipfw_dyn_v != NULL) - free(V_ipfw_dyn_v, M_IPFW); - for (;;) { - V_ipfw_dyn_v = malloc(V_curr_dyn_buckets * sizeof(ipfw_dyn_rule *), - M_IPFW, M_NOWAIT | M_ZERO); - if (V_ipfw_dyn_v != NULL || V_curr_dyn_buckets <= 2) - break; - V_curr_dyn_buckets /= 2; + + /* Update current pointers/buckets values */ + V_curr_dyn_buckets = nbuckets; + V_ipfw_dyn_v = dyn_v; + + IPFW_WUNLOCK(chain); + + IPFW_UH_WUNLOCK(chain); + + /* Start periodic callout on initial creation */ + if (dyn_v_old == NULL) { + callout_reset_on(&V_ipfw_timeout, hz, ipfw_dyn_tick, curvnet, 0); + return (0); } + + /* Destroy all mutexes */ + for (i = 0 ; i < nbuckets_old ; i++) + IPFW_BUCK_LOCK_DESTROY(&dyn_v_old[i]); + + /* Free old hash */ + free(dyn_v_old, M_IPFW); + + return 0; } /** @@ -597,33 +562,30 @@ realloc_dynamic_table(void) * - "parent" rules for the above (O_LIMIT_PARENT). */ static ipfw_dyn_rule * -add_dyn_rule(struct ipfw_flow_id *id, u_int8_t dyn_type, struct ip_fw *rule) +add_dyn_rule(struct ipfw_flow_id *id, int i, u_int8_t dyn_type, struct ip_fw *rule) { ipfw_dyn_rule *r; - int i; - IPFW_DYN_LOCK_ASSERT(); + IPFW_BUCK_ASSERT(i); - if (V_ipfw_dyn_v == NULL || - (V_dyn_count == 0 && V_dyn_buckets != V_curr_dyn_buckets)) { - realloc_dynamic_table(); - if (V_ipfw_dyn_v == NULL) - return NULL; /* failed ! */ - } - i = hash_packet(id); - - r = uma_zalloc(ipfw_dyn_rule_zone, M_NOWAIT | M_ZERO); + r = uma_zalloc(V_ipfw_dyn_rule_zone, M_NOWAIT | M_ZERO); if (r == NULL) { - printf ("ipfw: sorry cannot allocate state\n"); + if (last_log != time_uptime) { + last_log = time_uptime; + log(LOG_DEBUG, "ipfw: %s: Cannot allocate rule\n", + __func__); + } return NULL; } - /* increase refcount on parent, and set pointer */ + /* + * refcount on parent is already incremented, so + * it is safe to use parent unlocked. + */ if (dyn_type == O_LIMIT) { ipfw_dyn_rule *parent = (ipfw_dyn_rule *)rule; if ( parent->dyn_type != O_LIMIT_PARENT) panic("invalid parent"); - parent->count++; r->parent = parent; rule = parent->rule; } @@ -636,35 +598,9 @@ add_dyn_rule(struct ipfw_flow_id *id, u_ r->count = 0; r->bucket = i; - r->next = V_ipfw_dyn_v[i]; - V_ipfw_dyn_v[i] = r; - V_dyn_count++; - DEB({ - struct in_addr da; -#ifdef INET6 - char src[INET6_ADDRSTRLEN]; - char dst[INET6_ADDRSTRLEN]; -#else - char src[INET_ADDRSTRLEN]; - char dst[INET_ADDRSTRLEN]; -#endif - -#ifdef INET6 - if (IS_IP6_FLOW_ID(&(r->id))) { - ip6_sprintf(src, &r->id.src_ip6); - ip6_sprintf(dst, &r->id.dst_ip6); - } else -#endif - { - da.s_addr = htonl(r->id.src_ip); - inet_ntoa_r(da, src); - da.s_addr = htonl(r->id.dst_ip); - inet_ntoa_r(da, dst); - } - printf("ipfw: add dyn entry ty %d %s %d -> %s %d, total %d\n", - dyn_type, src, r->id.src_port, dst, r->id.dst_port, - V_dyn_count); - }) + r->next = V_ipfw_dyn_v[i].head; + V_ipfw_dyn_v[i].head = r; + DEB(print_dyn_rule(id, dyn_type, "add dyn entry", "total");) return r; } @@ -673,39 +609,40 @@ add_dyn_rule(struct ipfw_flow_id *id, u_ * If the lookup fails, then install one. */ static ipfw_dyn_rule * -lookup_dyn_parent(struct ipfw_flow_id *pkt, struct ip_fw *rule) +lookup_dyn_parent(struct ipfw_flow_id *pkt, int *pindex, struct ip_fw *rule) { ipfw_dyn_rule *q; - int i; + int i, is_v6; - IPFW_DYN_LOCK_ASSERT(); + is_v6 = IS_IP6_FLOW_ID(pkt); + i = hash_packet( pkt, V_curr_dyn_buckets ); + *pindex = i; + IPFW_BUCK_LOCK(i); + for (q = V_ipfw_dyn_v[i].head ; q != NULL ; q=q->next) + if (q->dyn_type == O_LIMIT_PARENT && + rule== q->rule && + pkt->proto == q->id.proto && + pkt->src_port == q->id.src_port && + pkt->dst_port == q->id.dst_port && + ( + (is_v6 && + IN6_ARE_ADDR_EQUAL(&(pkt->src_ip6), + &(q->id.src_ip6)) && + IN6_ARE_ADDR_EQUAL(&(pkt->dst_ip6), + &(q->id.dst_ip6))) || + (!is_v6 && + pkt->src_ip == q->id.src_ip && + pkt->dst_ip == q->id.dst_ip) + ) + ) { + q->expire = time_uptime + V_dyn_short_lifetime; + DEB(print_dyn_rule(pkt, q->dyn_type, + "lookup_dyn_parent found", "");) + return q; + } - if (V_ipfw_dyn_v) { - int is_v6 = IS_IP6_FLOW_ID(pkt); - i = hash_packet( pkt ); - for (q = V_ipfw_dyn_v[i] ; q != NULL ; q=q->next) - if (q->dyn_type == O_LIMIT_PARENT && - rule== q->rule && - pkt->proto == q->id.proto && - pkt->src_port == q->id.src_port && - pkt->dst_port == q->id.dst_port && - ( - (is_v6 && - IN6_ARE_ADDR_EQUAL(&(pkt->src_ip6), - &(q->id.src_ip6)) && - IN6_ARE_ADDR_EQUAL(&(pkt->dst_ip6), - &(q->id.dst_ip6))) || - (!is_v6 && - pkt->src_ip == q->id.src_ip && - pkt->dst_ip == q->id.dst_ip) - ) - ) { - q->expire = time_uptime + V_dyn_short_lifetime; - DEB(printf("ipfw: lookup_dyn_parent found 0x%p\n",q);) - return q; - } - } - return add_dyn_rule(pkt, O_LIMIT_PARENT, rule); + /* Add virtual limiting rule */ + return add_dyn_rule(pkt, i, O_LIMIT_PARENT, rule); } /** @@ -718,41 +655,16 @@ int ipfw_install_state(struct ip_fw *rule, ipfw_insn_limit *cmd, struct ip_fw_args *args, uint32_t tablearg) { - static int last_log; ipfw_dyn_rule *q; - struct in_addr da; -#ifdef INET6 - char src[INET6_ADDRSTRLEN + 2], dst[INET6_ADDRSTRLEN + 2]; -#else - char src[INET_ADDRSTRLEN], dst[INET_ADDRSTRLEN]; -#endif - - src[0] = '\0'; - dst[0] = '\0'; + int i; - IPFW_DYN_LOCK(); + DEB(print_dyn_rule(&args->f_id, cmd->o.opcode, "install_state", "");) + + i = hash_packet(&args->f_id, V_curr_dyn_buckets); - DEB( -#ifdef INET6 - if (IS_IP6_FLOW_ID(&(args->f_id))) { - ip6_sprintf(src, &args->f_id.src_ip6); - ip6_sprintf(dst, &args->f_id.dst_ip6); - } else -#endif - { - da.s_addr = htonl(args->f_id.src_ip); - inet_ntoa_r(da, src); - da.s_addr = htonl(args->f_id.dst_ip); - inet_ntoa_r(da, dst); - } - printf("ipfw: %s: type %d %s %u -> %s %u\n", - __func__, cmd->o.opcode, src, args->f_id.src_port, - dst, args->f_id.dst_port); - src[0] = '\0'; - dst[0] = '\0'; - ) + IPFW_BUCK_LOCK(i); - q = lookup_dyn_rule_locked(&args->f_id, NULL, NULL); + q = lookup_dyn_rule_locked(&args->f_id, i, NULL, NULL); if (q != NULL) { /* should never occur */ DEB( @@ -761,26 +673,20 @@ ipfw_install_state(struct ip_fw *rule, i printf("ipfw: %s: entry already present, done\n", __func__); }) - IPFW_DYN_UNLOCK(); + IPFW_BUCK_UNLOCK(i); return (0); } - if (V_dyn_count >= V_dyn_max) - /* Run out of slots, try to remove any expired rule. */ - remove_dyn_rule(NULL, (ipfw_dyn_rule *)1); - - if (V_dyn_count >= V_dyn_max) { - if (last_log != time_uptime) { - last_log = time_uptime; - printf("ipfw: %s: Too many dynamic rules\n", __func__); - } - IPFW_DYN_UNLOCK(); - return (1); /* cannot install, notify caller */ - } + /* + * State limiting is done via uma(9) zone limiting. + * Save pointer to newly-installed rule and reject + * packet if add_dyn_rule() returned NULL. + * Note q is currently set to NULL. + */ switch (cmd->o.opcode) { case O_KEEP_STATE: /* bidir rule */ - add_dyn_rule(&args->f_id, O_KEEP_STATE, rule); + q = add_dyn_rule(&args->f_id, i, O_KEEP_STATE, rule); break; case O_LIMIT: { /* limit number of sessions */ @@ -788,6 +694,7 @@ ipfw_install_state(struct ip_fw *rule, i ipfw_dyn_rule *parent; uint32_t conn_limit; uint16_t limit_mask = cmd->limit_mask; + int pindex; conn_limit = (cmd->conn_limit == IP_FW_TABLEARG) ? tablearg : cmd->conn_limit; @@ -821,67 +728,65 @@ ipfw_install_state(struct ip_fw *rule, i id.src_port = args->f_id.src_port; if (limit_mask & DYN_DST_PORT) id.dst_port = args->f_id.dst_port; - if ((parent = lookup_dyn_parent(&id, rule)) == NULL) { + + /* + * We have to release lock for previous bucket to + * avoid possible deadlock + */ + IPFW_BUCK_UNLOCK(i); + + if ((parent = lookup_dyn_parent(&id, &pindex, rule)) == NULL) { printf("ipfw: %s: add parent failed\n", __func__); - IPFW_DYN_UNLOCK(); + IPFW_BUCK_UNLOCK(pindex); return (1); } if (parent->count >= conn_limit) { - /* See if we can remove some expired rule. */ - remove_dyn_rule(rule, parent); - if (parent->count >= conn_limit) { - if (V_fw_verbose && last_log != time_uptime) { - last_log = time_uptime; -#ifdef INET6 - /* - * XXX IPv6 flows are not - * supported yet. - */ - if (IS_IP6_FLOW_ID(&(args->f_id))) { - char ip6buf[INET6_ADDRSTRLEN]; - snprintf(src, sizeof(src), - "[%s]", ip6_sprintf(ip6buf, - &args->f_id.src_ip6)); - snprintf(dst, sizeof(dst), - "[%s]", ip6_sprintf(ip6buf, - &args->f_id.dst_ip6)); - } else -#endif - { - da.s_addr = - htonl(args->f_id.src_ip); - inet_ntoa_r(da, src); - da.s_addr = - htonl(args->f_id.dst_ip); - inet_ntoa_r(da, dst); - } - log(LOG_SECURITY | LOG_DEBUG, - "ipfw: %d %s %s:%u -> %s:%u, %s\n", - parent->rule->rulenum, - "drop session", - src, (args->f_id.src_port), - dst, (args->f_id.dst_port), - "too many entries"); - } - IPFW_DYN_UNLOCK(); - return (1); + if (V_fw_verbose && last_log != time_uptime) { + last_log = time_uptime; + char sbuf[24]; + last_log = time_uptime; + snprintf(sbuf, sizeof(sbuf), + "%d drop session", + parent->rule->rulenum); + print_dyn_rule_flags(&args->f_id, + cmd->o.opcode, + LOG_SECURITY | LOG_DEBUG, + sbuf, "too many entries"); } + IPFW_BUCK_UNLOCK(pindex); + return (1); + } + /* Increment counter on parent */ + parent->count++; + IPFW_BUCK_UNLOCK(pindex); + + IPFW_BUCK_LOCK(i); + q = add_dyn_rule(&args->f_id, i, O_LIMIT, (struct ip_fw *)parent); + if (q == NULL) { + /* Decrement index and notify caller */ + IPFW_BUCK_UNLOCK(i); + IPFW_BUCK_LOCK(pindex); + parent->count--; + IPFW_BUCK_UNLOCK(pindex); + return (1); } - add_dyn_rule(&args->f_id, O_LIMIT, (struct ip_fw *)parent); break; } default: printf("ipfw: %s: unknown dynamic rule type %u\n", __func__, cmd->o.opcode); - IPFW_DYN_UNLOCK(); - return (1); + } + + if (q == NULL) { + IPFW_BUCK_UNLOCK(i); + return (1); /* Notify caller about failure */ } /* XXX just set lifetime */ - lookup_dyn_rule_locked(&args->f_id, NULL, NULL); + lookup_dyn_rule_locked(&args->f_id, i, NULL, NULL); - IPFW_DYN_UNLOCK(); + IPFW_BUCK_UNLOCK(i); return (0); } @@ -1036,25 +941,117 @@ ipfw_send_pkt(struct mbuf *replyto, stru } /* - * This procedure is only used to handle keepalives. It is invoked - * every dyn_keepalive_period + * Queue keepalive packets for given dynamic rule + */ +static struct mbuf ** +ipfw_dyn_send_ka(struct mbuf **mtailp, ipfw_dyn_rule *q) +{ + struct mbuf *m_rev, *m_fwd; + + m_rev = (q->state & ACK_REV) ? NULL : + ipfw_send_pkt(NULL, &(q->id), q->ack_rev - 1, q->ack_fwd, TH_SYN); + m_fwd = (q->state & ACK_FWD) ? NULL : + ipfw_send_pkt(NULL, &(q->id), q->ack_fwd - 1, q->ack_rev, 0); + + if (m_rev != NULL) { + *mtailp = m_rev; + mtailp = &(*mtailp)->m_nextpkt; + } + if (m_fwd != NULL) { + *mtailp = m_fwd; + mtailp = &(*mtailp)->m_nextpkt; + } + + return (mtailp); +} + +/* + * This procedure is used to perform various maintance + * on dynamic hash list. Currently it is called every second. */ static void -ipfw_tick(void * vnetx) +ipfw_dyn_tick(void * vnetx) { - struct mbuf *m0, *m, *mnext, **mtailp; -#ifdef INET6 - struct mbuf *m6, **m6_tailp; -#endif - int i; - ipfw_dyn_rule *q; + struct ip_fw_chain *chain; + int check_ka = 0; #ifdef VIMAGE struct vnet *vp = vnetx; #endif CURVNET_SET(vp); - if (V_dyn_keepalive == 0 || V_ipfw_dyn_v == NULL || V_dyn_count == 0) - goto done; + + chain = &V_layer3_chain; + + /* Run keepalive checks every keepalive_interval iff ka is enabled */ + if ((V_dyn_keepalive_last + V_dyn_keepalive_interval >= time_uptime) && + (V_dyn_keepalive != 0)) { + V_dyn_keepalive_last = time_uptime; + check_ka = 1; + } + + check_dyn_rules(chain, NULL, RESVD_SET, check_ka, 1); + + callout_reset_on(&V_ipfw_timeout, hz, ipfw_dyn_tick, vnetx, 0); + + CURVNET_RESTORE(); +} + + +/* + * Walk thru all dynamic states doing generic maintance: + * 1) free expired states + * 2) free all states based on deleted rule / set + * 3) send keepalives for states if needed + * + * @chain - pointer to current ipfw rules chain + * @rule - delete all states originated by given rule if != NULL + * @set - delete all states originated by any rule in set @set if != RESVD_SET + * @check_ka - perform checking/sending keepalives + * @timer - indicate call from timer routine. + * + * Timer routine must call this function unlocked to permit + * sending keepalives/resizing table. + * + * Others has to call function with IPFW_UH_WLOCK held. + * Additionally, function assume that dynamic rule/set is + * ALREADY deleted so no new states can be generated by + * 'deleted' rules. + * + * Write lock is needed to ensure that unused parent rules + * are not freed by other instance (see stage 2, 3) + */ +static void +check_dyn_rules(struct ip_fw_chain *chain, struct ip_fw *rule, + int set, int check_ka, int timer) +{ + struct mbuf *m0, *m, *mnext, **mtailp; + struct ip *h; + int i, dyn_count, new_buckets = 0, max_buckets; + int expired = 0, expired_limits = 0, parents = 0, total = 0; + ipfw_dyn_rule *q, *q_prev, *q_next; + ipfw_dyn_rule *exp_head, **exptailp; + ipfw_dyn_rule *exp_lhead, **expltailp; + + KASSERT(V_ipfw_dyn_v != NULL, ("%s: dynamic table not allocated", + __func__)); + + /* Avoid possible LOR */ + KASSERT(!check_ka || timer, ("%s: keepalive check with lock held", + __func__)); + + /* + * Do not perform any checks if we currently have no dynamic states + */ + if (DYN_COUNT == 0) + return; + + /* Expired states */ + exp_head = NULL; + exptailp = &exp_head; + + /* Expired limit states */ + exp_lhead = NULL; + expltailp = &exp_lhead; /* * We make a chain of packets to go out here -- not deferring @@ -1064,99 +1061,255 @@ ipfw_tick(void * vnetx) */ m0 = NULL; mtailp = &m0; -#ifdef INET6 - m6 = NULL; - m6_tailp = &m6; -#endif - IPFW_DYN_LOCK(); + + /* Protect from hash resizing */ + if (timer != 0) + IPFW_UH_WLOCK(chain); + else + IPFW_UH_WLOCK_ASSERT(chain); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Dec 22 00:23:58 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7FC24BDF; Sat, 22 Dec 2012 00:23:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 639DB8FC0A; Sat, 22 Dec 2012 00:23:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBM0Nw4T069608; Sat, 22 Dec 2012 00:23:58 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBM0NwWs069607; Sat, 22 Dec 2012 00:23:58 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201212220023.qBM0NwWs069607@svn.freebsd.org> From: Devin Teske Date: Sat, 22 Dec 2012 00:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244573 - stable/9/usr.sbin/sysinstall X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2012 00:23:58 -0000 Author: dteske Date: Sat Dec 22 00:23:57 2012 New Revision: 244573 URL: http://svnweb.freebsd.org/changeset/base/244573 Log: Fix typo. (fixing them as I find them) Modified: stable/9/usr.sbin/sysinstall/ftp.c Modified: stable/9/usr.sbin/sysinstall/ftp.c ============================================================================== --- stable/9/usr.sbin/sysinstall/ftp.c Sat Dec 22 00:15:44 2012 (r244572) +++ stable/9/usr.sbin/sysinstall/ftp.c Sat Dec 22 00:23:57 2012 (r244573) @@ -107,7 +107,7 @@ try: hostname = variable_get(VAR_FTP_HOST); dir = variable_get(VAR_FTP_DIR); if (!hostname || !dir) { - msgConfirm("Missing FTP host or directory specification. FTP media not initialized,"); + msgConfirm("Missing FTP host or directory specification. FTP media not initialized."); netDown(dev); return FALSE; } From owner-svn-src-stable@FreeBSD.ORG Sat Dec 22 22:27:45 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A63AFC0; Sat, 22 Dec 2012 22:27:45 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 60B898FC13; Sat, 22 Dec 2012 22:27:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBMMRjSZ067399; Sat, 22 Dec 2012 22:27:45 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBMMRjMJ067398; Sat, 22 Dec 2012 22:27:45 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201212222227.qBMMRjMJ067398@svn.freebsd.org> From: Martin Matuska Date: Sat, 22 Dec 2012 22:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r244602 - stable/9/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2012 22:27:45 -0000 Author: mm Date: Sat Dec 22 22:27:44 2012 New Revision: 244602 URL: http://svnweb.freebsd.org/changeset/base/244602 Log: MFC r244246: illumos-gate 13894:f4af77f6bbd2 3397 zdb output is too verbose 3398 zdb can't dump feature flags zap objects References: https://www.illumos.org/issues/3397 https://www.illumos.org/issues/3398 Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Dec 22 21:32:12 2012 (r244601) +++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Dec 22 22:27:44 2012 (r244602) @@ -61,14 +61,16 @@ #undef verify #include -#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ - zio_compress_table[(idx)].ci_name : "UNKNOWN") -#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \ - zio_checksum_table[(idx)].ci_name : "UNKNOWN") -#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \ - dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \ - dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN") -#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : DMU_OT_NUMTYPES) +#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ + zio_compress_table[(idx)].ci_name : "UNKNOWN") +#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \ + zio_checksum_table[(idx)].ci_name : "UNKNOWN") +#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \ + dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \ + dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN") +#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : \ + (((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ? \ + DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES)) #ifndef lint extern int zfs_recover; @@ -3194,7 +3196,13 @@ main(int argc, char **argv) argv[i], strerror(errno)); } } - (os != NULL) ? dump_dir(os) : dump_zpool(spa); + if (os != NULL) { + dump_dir(os); + } else if (zopt_objects > 0 && !dump_opt['m']) { + dump_dir(spa->spa_meta_objset); + } else { + dump_zpool(spa); + } } else { flagbits['b'] = ZDB_FLAG_PRINT_BLKPTR; flagbits['c'] = ZDB_FLAG_CHECKSUM; From owner-svn-src-stable@FreeBSD.ORG Sat Dec 22 22:27:58 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BA37FC3; Sat, 22 Dec 2012 22:27:58 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 053AA8FC0C; Sat, 22 Dec 2012 22:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBMMRvNO067463; Sat, 22 Dec 2012 22:27:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBMMRvRW067462; Sat, 22 Dec 2012 22:27:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201212222227.qBMMRvRW067462@svn.freebsd.org> From: Martin Matuska Date: Sat, 22 Dec 2012 22:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r244603 - stable/8/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2012 22:27:58 -0000 Author: mm Date: Sat Dec 22 22:27:57 2012 New Revision: 244603 URL: http://svnweb.freebsd.org/changeset/base/244603 Log: MFC r244246: illumos-gate 13894:f4af77f6bbd2 3397 zdb output is too verbose 3398 zdb can't dump feature flags zap objects References: https://www.illumos.org/issues/3397 https://www.illumos.org/issues/3398 Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Dec 22 22:27:44 2012 (r244602) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Dec 22 22:27:57 2012 (r244603) @@ -61,14 +61,16 @@ #undef verify #include -#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ - zio_compress_table[(idx)].ci_name : "UNKNOWN") -#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \ - zio_checksum_table[(idx)].ci_name : "UNKNOWN") -#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \ - dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \ - dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN") -#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : DMU_OT_NUMTYPES) +#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ + zio_compress_table[(idx)].ci_name : "UNKNOWN") +#define ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ? \ + zio_checksum_table[(idx)].ci_name : "UNKNOWN") +#define ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ? \ + dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ? \ + dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN") +#define ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) : \ + (((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ? \ + DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES)) #ifndef lint extern int zfs_recover; @@ -3194,7 +3196,13 @@ main(int argc, char **argv) argv[i], strerror(errno)); } } - (os != NULL) ? dump_dir(os) : dump_zpool(spa); + if (os != NULL) { + dump_dir(os); + } else if (zopt_objects > 0 && !dump_opt['m']) { + dump_dir(spa->spa_meta_objset); + } else { + dump_zpool(spa); + } } else { flagbits['b'] = ZDB_FLAG_PRINT_BLKPTR; flagbits['c'] = ZDB_FLAG_CHECKSUM;