From owner-svn-src-stable-9@freebsd.org Sun Jan 3 17:19:18 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4A0BA60123; Sun, 3 Jan 2016 17:19:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B27561987; Sun, 3 Jan 2016 17:19:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u03HJHXf075637; Sun, 3 Jan 2016 17:19:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u03HJHBB075636; Sun, 3 Jan 2016 17:19:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201601031719.u03HJHBB075636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 3 Jan 2016 17:19:17 +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: r293109 - in stable: 10/share/mk 9/share/mk 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2016 17:19:19 -0000 Author: dim Date: Sun Jan 3 17:19:17 2016 New Revision: 293109 URL: https://svnweb.freebsd.org/changeset/base/293109 Log: MFC r293014: Merge r293006 from clang380-import branch: For determining the compiler version, quote the string to be echo'd, otherwise the command might fail. This is because clang -v now results in the following: FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn) The second "3.8.8svn)" string tripped up the shell command. Modified: stable/9/share/mk/bsd.compiler.mk Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/mk/bsd.compiler.mk Directory Properties: stable/10/ (props changed) Modified: stable/9/share/mk/bsd.compiler.mk ============================================================================== --- stable/9/share/mk/bsd.compiler.mk Sun Jan 3 16:13:03 2016 (r293108) +++ stable/9/share/mk/bsd.compiler.mk Sun Jan 3 17:19:17 2016 (r293109) @@ -40,7 +40,7 @@ COMPILER_TYPE:= clang . endif .endif .if !defined(COMPILER_VERSION) -COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]*} | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' +COMPILER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' .endif .undef _v .endif From owner-svn-src-stable-9@freebsd.org Sun Jan 3 17:23:17 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC16CA60368; Sun, 3 Jan 2016 17:23:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B1631E90; Sun, 3 Jan 2016 17:23:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u03HNGC6078400; Sun, 3 Jan 2016 17:23:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u03HNGoU078399; Sun, 3 Jan 2016 17:23:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201601031723.u03HNGoU078399@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 3 Jan 2016 17:23: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: r293110 - in stable: 10/contrib/pf/pflogd 9/contrib/pf/pflogd 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2016 17:23:17 -0000 Author: dim Date: Sun Jan 3 17:23:16 2016 New Revision: 293110 URL: https://svnweb.freebsd.org/changeset/base/293110 Log: MFC r293015: Merge r293013 from clang380-import branch: Fix a clang 3.8.0 warning in pflogd.c: contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses] if (!if_exists(interface) == -1) { ^ ~~ The if_exists() function does not return -1, and even if it did, it would not be the correct way to check. Just ditch the == -1 instead. Obtained from: OpenBSD's pflogd.c 1.49 Modified: stable/9/contrib/pf/pflogd/pflogd.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/pf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/pf/pflogd/pflogd.c Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/pf/pflogd/pflogd.c ============================================================================== --- stable/9/contrib/pf/pflogd/pflogd.c Sun Jan 3 17:19:17 2016 (r293109) +++ stable/9/contrib/pf/pflogd/pflogd.c Sun Jan 3 17:23:16 2016 (r293110) @@ -766,7 +766,7 @@ main(int argc, char **argv) np = pcap_dispatch(hpcap, PCAP_NUM_PKTS, phandler, (u_char *)dpcap); if (np < 0) { - if (!if_exists(interface) == -1) { + if (!if_exists(interface)) { logmsg(LOG_NOTICE, "interface %s went away", interface); ret = -1; From owner-svn-src-stable-9@freebsd.org Mon Jan 4 03:22:08 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 989F9A61C84; Mon, 4 Jan 2016 03:22:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19A2C1BF6; Mon, 4 Jan 2016 03:22:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u043M7Rv007544; Mon, 4 Jan 2016 03:22:07 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u043M7B5007541; Mon, 4 Jan 2016 03:22:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201601040322.u043M7B5007541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 4 Jan 2016 03:22:07 +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: r293133 - in stable/9/usr.sbin/cron: cron crontab 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 03:22:08 -0000 Author: pfg Date: Mon Jan 4 03:22:06 2016 New Revision: 293133 URL: https://svnweb.freebsd.org/changeset/base/293133 Log: MFC r292605, r292606, r292607, r292608: cron: bring some fixes for Coverity reports and other issues. crontab: replace malloc + bzero with calloc crontab: properly free an entry cron: Check the return value of pipe(2) CID: 271773, 1009830, Modified: stable/9/usr.sbin/cron/cron/do_command.c stable/9/usr.sbin/cron/cron/popen.c stable/9/usr.sbin/cron/crontab/crontab.c Directory Properties: stable/9/usr.sbin/cron/ (props changed) stable/9/usr.sbin/cron/crontab/ (props changed) Modified: stable/9/usr.sbin/cron/cron/do_command.c ============================================================================== --- stable/9/usr.sbin/cron/cron/do_command.c Mon Jan 4 03:20:41 2016 (r293132) +++ stable/9/usr.sbin/cron/cron/do_command.c Mon Jan 4 03:22:06 2016 (r293133) @@ -161,8 +161,10 @@ child_process(e, u) /* create some pipes to talk to our future child */ - pipe(stdin_pipe); /* child's stdin */ - pipe(stdout_pipe); /* child's stdout */ + if (pipe(stdin_pipe) != 0 || pipe(stdout_pipe) != 0) { + log_it("CRON", getpid(), "error", "can't pipe"); + exit(ERROR_EXIT); + } /* since we are a forked process, we can diddle the command string * we were passed -- nobody else is going to use it again, right? Modified: stable/9/usr.sbin/cron/cron/popen.c ============================================================================== --- stable/9/usr.sbin/cron/cron/popen.c Mon Jan 4 03:20:41 2016 (r293132) +++ stable/9/usr.sbin/cron/cron/popen.c Mon Jan 4 03:22:06 2016 (r293133) @@ -82,9 +82,8 @@ cron_popen(program, type, e) if (!pids) { if ((fds = getdtablesize()) <= 0) return(NULL); - if (!(pids = (PID_T *)malloc((u_int)(fds * sizeof(PID_T))))) + if (!(pids = calloc(fds, sizeof(PID_T)))) return(NULL); - bzero((char *)pids, fds * sizeof(PID_T)); } if (pipe(pdes) < 0) return(NULL); Modified: stable/9/usr.sbin/cron/crontab/crontab.c ============================================================================== --- stable/9/usr.sbin/cron/crontab/crontab.c Mon Jan 4 03:20:41 2016 (r293132) +++ stable/9/usr.sbin/cron/crontab/crontab.c Mon Jan 4 03:22:06 2016 (r293133) @@ -558,7 +558,7 @@ replace_cmd() { case FALSE: e = load_entry(tmp, check_error, pw, envp); if (e) - free(e); + free_entry(e); break; case TRUE: break; From owner-svn-src-stable-9@freebsd.org Mon Jan 4 06:58:41 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 252EEA5F90C; Mon, 4 Jan 2016 06:58:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAC3212FA; Mon, 4 Jan 2016 06:58:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u046wduT079477; Mon, 4 Jan 2016 06:58:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u046wdI4079476; Mon, 4 Jan 2016 06:58:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201601040658.u046wdI4079476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 4 Jan 2016 06:58:39 +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: r293139 - stable/9/tools/regression/mac/mac_bsdextended 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 06:58:41 -0000 Author: ngie Date: Mon Jan 4 06:58:39 2016 New Revision: 293139 URL: https://svnweb.freebsd.org/changeset/base/293139 Log: MFstable/10 r293138: MFC r292531,r292532,r292533,r292545: r292531: Make test_matches.sh into a series of TAP testcases Use temporary filesystems / memory disks instead of a hardcoded path which doesn't exist on test systems r292532: Mark `subject matching jailid` testcase as an unexpected failure with TODO to ensure that the testcase isn't marked as a failure PR: 205481 r292533: Skip the testcases if mac_bsdextended(4) isn't detected on the system r292545: Redo the TAP integration so it works with Kyua Kyua needs numbers in the TAP results :/, but prove doesn't Modified: stable/9/tools/regression/mac/mac_bsdextended/test_matches.sh Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/mac/mac_bsdextended/test_matches.sh ============================================================================== --- stable/9/tools/regression/mac/mac_bsdextended/test_matches.sh Mon Jan 4 06:57:06 2016 (r293138) +++ stable/9/tools/regression/mac/mac_bsdextended/test_matches.sh Mon Jan 4 06:58:39 2016 (r293139) @@ -10,158 +10,344 @@ uidoutrange="daemon" gidinrange="nobody" # We expect $uidinrange in this group gidoutrange="daemon" # We expect $uidinrange in this group -playground="/stuff/nobody/" # Must not be on root fs +test_num=1 +pass() +{ + echo "ok $test_num # $@" + : $(( test_num += 1 )) +} + +fail() +{ + echo "not ok $test_num # $@" + : $(( test_num += 1 )) +} # # Setup # -rm -f $playground/test* + +: ${TMPDIR=/tmp} +if [ $(id -u) -ne 0 ]; then + echo "1..0 # SKIP test must be run as root" + exit 0 +fi +if ! sysctl -N security.mac.bsdextended >/dev/null 2>&1; then + echo "1..0 # SKIP mac_bsdextended(4) support isn't available" + exit 0 +fi +if ! playground=$(mktemp -d $TMPDIR/tmp.XXXXXXX); then + echo "1..0 # SKIP failed to create temporary directory" + exit 0 +fi +trap "rmdir $playground" EXIT INT TERM +if ! mdmfs -s 25m md $playground; then + echo "1..0 # SKIP failed to mount md device" + exit 0 +fi +chmod a+rwx $playground +md_device=$(mount -p | grep "$playground" | awk '{ gsub(/^\/dev\//, "", $1); print $1 }') +trap "umount -f $playground; mdconfig -d -u $md_device; rmdir $playground" EXIT INT TERM +if [ -z "$md_device" ]; then + mount -p | grep $playground + echo "1..0 # SKIP md device not properly attached to the system" +fi + ugidfw remove 1 file1=$playground/test-$uidinrange file2=$playground/test-$uidoutrange -cat < $playground/test-script.pl -if (open(F, ">" . shift)) { exit 0; } else { exit 1; } +cat > $playground/test-script.sh <<'EOF' +#!/bin/sh +: > $1 EOF -command1="perl $playground/test-script.pl $file1" -command2="perl $playground/test-script.pl $file2" +if [ $? -ne 0 ]; then + echo "1..0 # SKIP failed to create test script" + exit 0 +fi +echo "1..30" + +command1="sh $playground/test-script.sh $file1" +command2="sh $playground/test-script.sh $file2" + +desc="$uidinrange file" +if su -m $uidinrange -c "$command1"; then + pass $desc +else + fail $desc +fi -echo -n "$uidinrange file: " -su -m $uidinrange -c "$command1 && echo good" chown "$uidinrange":"$gidinrange" $file1 chmod a+w $file1 -echo -n "$uidoutrange file: " -$command2 && echo good +desc="$uidoutrange file" +if $command2; then + pass $desc +else + fail $desc +fi + chown "$uidoutrange":"$gidoutrange" $file2 chmod a+w $file2 # # No rules # -echo -n "no rules $uidinrange: " -su -fm $uidinrange -c "$command1 && echo good" -echo -n "no rules $uidoutrange: " -su -fm $uidoutrange -c "$command1 && echo good" +desc="no rules $uidinrange" +if su -fm $uidinrange -c "$command1"; then + pass $desc +else + fail $desc +fi + +desc="no rules $uidoutrange" +if su -fm $uidoutrange -c "$command1"; then + pass $desc +else + fail $desc +fi # # Subject Match on uid # ugidfw set 1 subject uid $uidrange object mode rasx -echo -n "subject uid in range: " -su -fm $uidinrange -c "$command1 || echo good" -echo -n "subject uid out range: " -su -fm $uidoutrange -c "$command1 && echo good" +desc="subject uid in range" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi + +desc="subject uid out range" +if su -fm $uidoutrange -c "$command1"; then + pass $desc +else + fail $desc +fi # # Subject Match on gid # ugidfw set 1 subject gid $gidrange object mode rasx -echo -n "subject gid in range: " -su -fm $uidinrange -c "$command1 || echo good" -echo -n "subject gid out range: " -su -fm $uidoutrange -c "$command1 && echo good" + +desc="subject gid in range" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi + +desc="subject gid out range" +if su -fm $uidoutrange -c "$command1"; then + pass $desc +else + fail $desc +fi # # Subject Match on jail # -echo -n "subject matching jailid: " rm -f $playground/test-jail -jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 3; touch $playground/test-jail) &"` + +desc="subject matching jailid" +jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` ugidfw set 1 subject jailid $jailid object mode rasx -sleep 6 -if [ ! -f $playground/test-jail ] ; then echo good ; fi +sleep 10 + +if [ -f $playground/test-jail ]; then + fail "TODO $desc: this testcase fails (see bug # 205481)" +else + pass $desc +fi -echo -n "subject nonmatching jailid: " rm -f $playground/test-jail -jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 3; touch $playground/test-jail) &"` -sleep 6 -if [ -f $playground/test-jail ] ; then echo good ; fi +desc="subject nonmatching jailid" +jailid=`jail -i / localhost 127.0.0.1 /usr/sbin/daemon -f /bin/sh -c "(sleep 5; touch $playground/test-jail) &"` +sleep 10 +if [ -f $playground/test-jail ]; then + pass $desc +else + fail $desc +fi # # Object uid # ugidfw set 1 subject object uid $uidrange mode rasx -echo -n "object uid in range: " -su -fm $uidinrange -c "$command1 || echo good" -echo -n "object uid out range: " -su -fm $uidinrange -c "$command2 && echo good" + +desc="object uid in range" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi + +desc="object uid out range" +if su -fm $uidinrange -c "$command2"; then + pass $desc +else + fail $desc +fi ugidfw set 1 subject object uid $uidrange mode rasx -echo -n "object uid in range (differennt subject): " -su -fm $uidoutrange -c "$command1 || echo good" -echo -n "object uid out range (differennt subject): " -su -fm $uidoutrange -c "$command2 && echo good" + +desc="object uid in range (different subject)" +if su -fm $uidoutrange -c "$command1"; then + fail $desc +else + pass $desc +fi + +desc="object uid out range (different subject)" +if su -fm $uidoutrange -c "$command2"; then + pass $desc +else + fail $desc +fi # # Object gid # ugidfw set 1 subject object gid $uidrange mode rasx -echo -n "object gid in range: " -su -fm $uidinrange -c "$command1 || echo good" -echo -n "object gid out range: " -su -fm $uidinrange -c "$command2 && echo good" -echo -n "object gid in range (differennt subject): " -su -fm $uidoutrange -c "$command1 || echo good" -echo -n "object gid out range (differennt subject): " -su -fm $uidoutrange -c "$command2 && echo good" + +desc="object gid in range" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi + +desc="object gid out range" +if su -fm $uidinrange -c "$command2"; then + pass $desc +else + fail $desc +fi +desc="object gid in range (different subject)" +if su -fm $uidoutrange -c "$command1"; then + fail $desc +else + pass $desc +fi + +desc="object gid out range (different subject)" +if su -fm $uidoutrange -c "$command2"; then + pass $desc +else + fail $desc +fi # # Object filesys # ugidfw set 1 subject uid $uidrange object filesys / mode rasx -echo -n "object out of filesys: " -su -fm $uidinrange -c "$command1 && echo good" +desc="object out of filesys" +if su -fm $uidinrange -c "$command1"; then + pass $desc +else + fail $desc +fi + ugidfw set 1 subject uid $uidrange object filesys $playground mode rasx -echo -n "object in filesys: " -su -fm $uidinrange -c "$command1 || echo good" +desc="object in filesys" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi # # Object suid # ugidfw set 1 subject uid $uidrange object suid mode rasx -echo -n "object notsuid: " -su -fm $uidinrange -c "$command1 && echo good" +desc="object notsuid" +if su -fm $uidinrange -c "$command1"; then + pass $desc +else + fail $desc +fi + chmod u+s $file1 -echo -n "object suid: " -su -fm $uidinrange -c "$command1 || echo good" +desc="object suid" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi chmod u-s $file1 # # Object sgid # ugidfw set 1 subject uid $uidrange object sgid mode rasx -echo -n "object notsgid: " -su -fm $uidinrange -c "$command1 && echo good" +desc="object notsgid" +if su -fm $uidinrange -c "$command1"; then + pass $desc +else + fail $desc +fi + chmod g+s $file1 -echo -n "object sgid: " -su -fm $uidinrange -c "$command1 || echo good" +desc="object sgid" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi chmod g-s $file1 # # Object uid matches subject # ugidfw set 1 subject uid $uidrange object uid_of_subject mode rasx -echo -n "object uid notmatches subject: " -su -fm $uidinrange -c "$command2 && echo good" -echo -n "object uid matches subject: " -su -fm $uidinrange -c "$command1 || echo good" + +desc="object uid notmatches subject" +if su -fm $uidinrange -c "$command2"; then + pass $desc +else + fail $desc +fi + +desc="object uid matches subject" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi # # Object gid matches subject # ugidfw set 1 subject uid $uidrange object gid_of_subject mode rasx -echo -n "object gid notmatches subject: " -su -fm $uidinrange -c "$command2 && echo good" -echo -n "object gid matches subject: " -su -fm $uidinrange -c "$command1 || echo good" + +desc="object gid notmatches subject" +if su -fm $uidinrange -c "$command2"; then + pass $desc +else + fail $desc +fi + +desc="object gid matches subject" +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi # # Object type # +desc="object not type" ugidfw set 1 subject uid $uidrange object type dbclsp mode rasx -echo -n "object not type: " -su -fm $uidinrange -c "$command1 && echo good" -ugidfw set 1 subject uid $uidrange object type r mode rasx -echo -n "object type: " -su -fm $uidinrange -c "$command1 || echo good" +if su -fm $uidinrange -c "$command1"; then + pass $desc +else + fail $desc +fi +desc="object type" +ugidfw set 1 subject uid $uidrange object type r mode rasx +if su -fm $uidinrange -c "$command1"; then + fail $desc +else + pass $desc +fi From owner-svn-src-stable-9@freebsd.org Mon Jan 4 07:05:00 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B847A5FD36; Mon, 4 Jan 2016 07:05:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAACB1C90; Mon, 4 Jan 2016 07:04:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0474xN0082656; Mon, 4 Jan 2016 07:04:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0474wHO082654; Mon, 4 Jan 2016 07:04:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201601040704.u0474wHO082654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 4 Jan 2016 07:04: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: r293142 - stable/9/contrib/bsnmp/snmpd 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 07:05:00 -0000 Author: ngie Date: Mon Jan 4 07:04:58 2016 New Revision: 293142 URL: https://svnweb.freebsd.org/changeset/base/293142 Log: MFstable/10 r293141: MFC r292815: Staticize several variables that are used exclusively in bsnmpd/main.c and bsnmpd/trap.c This fixes several -Wmissing-variable-declaration warnings noted by clang Modified: stable/9/contrib/bsnmp/snmpd/main.c stable/9/contrib/bsnmp/snmpd/trap.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) Modified: stable/9/contrib/bsnmp/snmpd/main.c ============================================================================== --- stable/9/contrib/bsnmp/snmpd/main.c Mon Jan 4 07:03:58 2016 (r293141) +++ stable/9/contrib/bsnmp/snmpd/main.c Mon Jan 4 07:04:58 2016 (r293142) @@ -119,26 +119,30 @@ static struct lmodules modules_start = T struct community_list community_list = TAILQ_HEAD_INITIALIZER(community_list); /* list of all known USM users */ -struct usm_userlist usm_userlist = SLIST_HEAD_INITIALIZER(usm_userlist); +static struct usm_userlist usm_userlist = SLIST_HEAD_INITIALIZER(usm_userlist); /* A list of all VACM users configured, including v1, v2c and v3 */ -struct vacm_userlist vacm_userlist = SLIST_HEAD_INITIALIZER(vacm_userlist); +static struct vacm_userlist vacm_userlist = + SLIST_HEAD_INITIALIZER(vacm_userlist); /* A list of all VACM groups */ -struct vacm_grouplist vacm_grouplist = SLIST_HEAD_INITIALIZER(vacm_grouplist); +static struct vacm_grouplist vacm_grouplist = + SLIST_HEAD_INITIALIZER(vacm_grouplist); static struct vacm_group vacm_default_group = { .groupname = "", }; /* The list of configured access entries */ -struct vacm_accesslist vacm_accesslist = TAILQ_HEAD_INITIALIZER(vacm_accesslist); +static struct vacm_accesslist vacm_accesslist = + TAILQ_HEAD_INITIALIZER(vacm_accesslist); /* The list of configured views */ -struct vacm_viewlist vacm_viewlist = SLIST_HEAD_INITIALIZER(vacm_viewlist); +static struct vacm_viewlist vacm_viewlist = + SLIST_HEAD_INITIALIZER(vacm_viewlist); /* The list of configured contexts */ -struct vacm_contextlist vacm_contextlist = +static struct vacm_contextlist vacm_contextlist = SLIST_HEAD_INITIALIZER(vacm_contextlist); /* list of all installed object resources */ Modified: stable/9/contrib/bsnmp/snmpd/trap.c ============================================================================== --- stable/9/contrib/bsnmp/snmpd/trap.c Mon Jan 4 07:03:58 2016 (r293141) +++ stable/9/contrib/bsnmp/snmpd/trap.c Mon Jan 4 07:04:58 2016 (r293142) @@ -60,15 +60,15 @@ struct trapsink_list trapsink_list = TAILQ_HEAD_INITIALIZER(trapsink_list); /* List of target addresses */ -struct target_addresslist target_addresslist = +static struct target_addresslist target_addresslist = SLIST_HEAD_INITIALIZER(target_addresslist); /* List of target parameters */ -struct target_paramlist target_paramlist = +static struct target_paramlist target_paramlist = SLIST_HEAD_INITIALIZER(target_paramlist); /* List of notification targets */ -struct target_notifylist target_notifylist = +static struct target_notifylist target_notifylist = SLIST_HEAD_INITIALIZER(target_notifylist); static const struct asn_oid oid_begemotTrapSinkTable = From owner-svn-src-stable-9@freebsd.org Mon Jan 4 07:29:20 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0C09A605EE; Mon, 4 Jan 2016 07:29:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9072D1FAC; Mon, 4 Jan 2016 07:29:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u047TJow089472; Mon, 4 Jan 2016 07:29:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u047TJon089471; Mon, 4 Jan 2016 07:29:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201601040729.u047TJon089471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Jan 2016 07:29:19 +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: r293147 - stable/9/sys/dev/usb/controller 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 07:29:20 -0000 Author: hselasky Date: Mon Jan 4 07:29:19 2016 New Revision: 293147 URL: https://svnweb.freebsd.org/changeset/base/293147 Log: MFC r291199: Fix compile warning about shifting signed negative constant. Modified: stable/9/sys/dev/usb/controller/uhci.h Modified: stable/9/sys/dev/usb/controller/uhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/uhci.h Mon Jan 4 07:27:58 2016 (r293146) +++ stable/9/sys/dev/usb/controller/uhci.h Mon Jan 4 07:29:19 2016 (r293147) @@ -97,7 +97,7 @@ struct uhci_td { #define UHCI_TD_GET_ENDPT(s) (((s) >> 15) & 0xf) #define UHCI_TD_SET_DT(t) ((t) << 19) #define UHCI_TD_GET_DT(s) (((s) >> 19) & 1) -#define UHCI_TD_SET_MAXLEN(l) (((l)-1) << 21) +#define UHCI_TD_SET_MAXLEN(l) (((l)-1U) << 21) #define UHCI_TD_GET_MAXLEN(s) ((((s) >> 21) + 1) & 0x7ff) #define UHCI_TD_MAXLEN_MASK 0xffe00000 volatile uint32_t td_buffer; From owner-svn-src-stable-9@freebsd.org Mon Jan 4 08:39:58 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59241A6004A; Mon, 4 Jan 2016 08:39:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D0F81808; Mon, 4 Jan 2016 08:39:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u048dvT4009982; Mon, 4 Jan 2016 08:39:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u048dv5q009981; Mon, 4 Jan 2016 08:39:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201601040839.u048dv5q009981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 4 Jan 2016 08:39:57 +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: r293149 - stable/9/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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 08:39:58 -0000 Author: hselasky Date: Mon Jan 4 08:39:56 2016 New Revision: 293149 URL: https://svnweb.freebsd.org/changeset/base/293149 Log: Add missed mergeinfo. Modified: Directory Properties: stable/9/sys/ (props changed) From owner-svn-src-stable-9@freebsd.org Wed Jan 6 16:27:19 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22381A62A64; Wed, 6 Jan 2016 16:27:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6D6D1999; Wed, 6 Jan 2016 16:27:18 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u06GRItU017857; Wed, 6 Jan 2016 16:27:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u06GRIUV017856; Wed, 6 Jan 2016 16:27:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201601061627.u06GRIUV017856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 6 Jan 2016 16:27: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: r293237 - stable/9/sys/fs/ext2fs 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 16:27:19 -0000 Author: pfg Date: Wed Jan 6 16:27:17 2016 New Revision: 293237 URL: https://svnweb.freebsd.org/changeset/base/293237 Log: MFC r292872: ext2: recognize ext4 INCOMPAT_RECOVER flag This is a flag specific for journalling in ext4. Add it to the list of ext4 features we ignore for read-only purposes. PR: 205668 Modified: stable/9/sys/fs/ext2fs/ext2fs.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Wed Jan 6 16:25:00 2016 (r293236) +++ stable/9/sys/fs/ext2fs/ext2fs.h Wed Jan 6 16:27:17 2016 (r293237) @@ -187,6 +187,7 @@ struct csum { #define EXT2F_INCOMPAT_COMP 0x0001 #define EXT2F_INCOMPAT_FTYPE 0x0002 +#define EXT2F_INCOMPAT_RECOVER 0x0004 #define EXT2F_INCOMPAT_META_BG 0x0010 #define EXT2F_INCOMPAT_EXTENTS 0x0040 #define EXT2F_INCOMPAT_64BIT 0x0080 @@ -208,6 +209,7 @@ struct csum { * * We do not support these EXT4 features but they are irrelevant * for read-only support: + * - EXT2F_INCOMPAT_RECOVER * - EXT2F_INCOMPAT_FLEX_BG * - EXT2F_INCOMPAT_META_BG */ @@ -216,6 +218,7 @@ struct csum { EXT2F_ROCOMPAT_EXTRA_ISIZE) #define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE #define EXT4F_RO_INCOMPAT_SUPP (EXT2F_INCOMPAT_EXTENTS | \ + EXT2F_INCOMPAT_RECOVER | \ EXT2F_INCOMPAT_FLEX_BG | \ EXT2F_INCOMPAT_META_BG ) From owner-svn-src-stable-9@freebsd.org Wed Jan 6 16:35:31 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D703A62DC5; Wed, 6 Jan 2016 16:35:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E06E1F83; Wed, 6 Jan 2016 16:35:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u06GZUHh020693; Wed, 6 Jan 2016 16:35:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u06GZUqF020692; Wed, 6 Jan 2016 16:35:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201601061635.u06GZUqF020692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 6 Jan 2016 16:35:30 +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: r293239 - stable/9/bin/pax 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 16:35:31 -0000 Author: pfg Date: Wed Jan 6 16:35:30 2016 New Revision: 293239 URL: https://svnweb.freebsd.org/changeset/base/293239 Log: MFC r292877: pax: prevent possible buffer overflow Or at least quiet down some static analyzers about it. CID: 978835 Obtained from: OpenBSD Modified: stable/9/bin/pax/pat_rep.c Modified: stable/9/bin/pax/pat_rep.c ============================================================================== --- stable/9/bin/pax/pat_rep.c Wed Jan 6 16:32:39 2016 (r293238) +++ stable/9/bin/pax/pat_rep.c Wed Jan 6 16:35:30 2016 (r293239) @@ -880,7 +880,7 @@ rep_name(char *name, int *nlen, int prnt * (the user already saw that substitution go by) */ pt = rephead; - (void)strcpy(buf1, name); + (void)strlcpy(buf1, name, sizeof(buf1)); inpt = buf1; outpt = nname; endpt = outpt + PAXPATHLEN; From owner-svn-src-stable-9@freebsd.org Wed Jan 6 17:53:52 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CAF0A64B75; Wed, 6 Jan 2016 17:53:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445731967; Wed, 6 Jan 2016 17:53:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u06HrpOx045065; Wed, 6 Jan 2016 17:53:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u06HrpS9045063; Wed, 6 Jan 2016 17:53:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201601061753.u06HrpS9045063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 6 Jan 2016 17:53: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: r293243 - stable/9/usr.sbin/mailwrapper 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 17:53:52 -0000 Author: bdrewery Date: Wed Jan 6 17:53:51 2016 New Revision: 293243 URL: https://svnweb.freebsd.org/changeset/base/293243 Log: MFC r270675: Allow mailwrapper to use mailer.conf from localbase (respecting LOCALBASE env var if set) PR: 205965 Relnotes: yes Modified: stable/9/usr.sbin/mailwrapper/mailwrapper.8 stable/9/usr.sbin/mailwrapper/mailwrapper.c Directory Properties: stable/9/usr.sbin/mailwrapper/ (props changed) Modified: stable/9/usr.sbin/mailwrapper/mailwrapper.8 ============================================================================== --- stable/9/usr.sbin/mailwrapper/mailwrapper.8 Wed Jan 6 17:48:35 2016 (r293242) +++ stable/9/usr.sbin/mailwrapper/mailwrapper.8 Wed Jan 6 17:53:51 2016 (r293243) @@ -31,7 +31,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. .\" -.Dd August 7, 2006 +.Dd August 27, 2014 .Dt MAILWRAPPER 8 .Os .Sh NAME @@ -109,6 +109,8 @@ utility is designed to replace and to invoke an appropriate MTA instead of .Xr sendmail 8 based on configuration information placed in +.Pa ${LOCALBASE}/etc/mail/mailer.conf +falling back on .Pa /etc/mail/mailer.conf . This permits the administrator to configure which MTA is to be invoked on the system at run time. @@ -126,6 +128,8 @@ should be turned off in Configuration for .Nm is kept in +.Pa ${LOCALBASE}/etc/mail/mailer.conf +or .Pa /etc/mail/mailer.conf . .Pa /usr/sbin/sendmail is typically set up as a symbolic link to Modified: stable/9/usr.sbin/mailwrapper/mailwrapper.c ============================================================================== --- stable/9/usr.sbin/mailwrapper/mailwrapper.c Wed Jan 6 17:48:35 2016 (r293242) +++ stable/9/usr.sbin/mailwrapper/mailwrapper.c Wed Jan 6 17:53:51 2016 (r293243) @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include #include #include @@ -87,6 +89,8 @@ main(int argc, char *argv[], char *envp[ FILE *config; char *line, *cp, *from, *to, *ap; const char *progname; + char localmailerconf[MAXPATHLEN]; + const char *mailerconf; size_t len, lineno = 0; int i; struct arglist al; @@ -98,11 +102,18 @@ main(int argc, char *argv[], char *envp[ initarg(&al); addarg(&al, argv[0]); - if ((config = fopen(_PATH_MAILERCONF, "r")) == NULL) { + snprintf(localmailerconf, MAXPATHLEN, "%s/etc/mail/mailer.conf", + getenv("LOCALBASE") ? getenv("LOCALBASE") : "/usr/local"); + + mailerconf = localmailerconf; + if ((config = fopen(localmailerconf, "r")) == NULL) + mailerconf = _PATH_MAILERCONF; + + if (config == NULL && ((config = fopen(mailerconf, "r")) == NULL)) { addarg(&al, NULL); openlog(getprogname(), LOG_PID, LOG_MAIL); syslog(LOG_INFO, "cannot open %s, using %s as default MTA", - _PATH_MAILERCONF, _PATH_DEFAULTMTA); + mailerconf, _PATH_DEFAULTMTA); closelog(); execve(_PATH_DEFAULTMTA, al.argv, envp); err(EX_OSERR, "cannot exec %s", _PATH_DEFAULTMTA); @@ -112,7 +123,7 @@ main(int argc, char *argv[], char *envp[ for (;;) { if ((line = fparseln(config, &len, &lineno, NULL, 0)) == NULL) { if (feof(config)) - errx(EX_CONFIG, "no mapping in %s", _PATH_MAILERCONF); + errx(EX_CONFIG, "no mapping in %s", mailerconf); err(EX_CONFIG, "cannot parse line %lu", (u_long)lineno); } @@ -157,6 +168,6 @@ main(int argc, char *argv[], char *envp[ /*NOTREACHED*/ parse_error: errx(EX_CONFIG, "parse error in %s at line %lu", - _PATH_MAILERCONF, (u_long)lineno); + mailerconf, (u_long)lineno); /*NOTREACHED*/ } From owner-svn-src-stable-9@freebsd.org Wed Jan 6 20:09:53 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23346A65DDB; Wed, 6 Jan 2016 20:09:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1A0A1DE8; Wed, 6 Jan 2016 20:09:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u06K9q6x084999; Wed, 6 Jan 2016 20:09:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u06K9qCX084998; Wed, 6 Jan 2016 20:09:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201601062009.u06K9qCX084998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 6 Jan 2016 20:09: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: r293260 - stable/9/tools/regression/mac/mac_bsdextended 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 20:09:53 -0000 Author: ngie Date: Wed Jan 6 20:09:51 2016 New Revision: 293260 URL: https://svnweb.freebsd.org/changeset/base/293260 Log: MFstable/10 r293246,r293257: r293246: MFC r292530,r292546: r292530: - Use 1 for an exit code instead of -1 with err, errx, and exit - Add unistd.h for getuid(3) - Sort #includes r292546: - Convert testcase to TAP format - Use nitems(x) instead of handrolled sizeof(x) / sizeof(*x) macro - Do not mark count != 0 case with bsde_get_rule_count as a failure; this generates false positives on systems with ugidfw rules set on it r293257: MFC r292650,r292651: r292650: Move mac_bsdextended check up before running the test_libugidfw_strings testcases I realize that these tests could be run before mac_bsdextended is loaded, but it would overcomplicate things to special case handle the testcases before doing the mac_bsdextended(4) feature check The testcases will be split up so they can be run separately in the near future r292651: Delete the comment about running `test_libugidfw_strings` before testing `mac_is_present` so it doesn't accidentally confuse people Modified: stable/9/tools/regression/mac/mac_bsdextended/test_ugidfw.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/mac/mac_bsdextended/test_ugidfw.c ============================================================================== --- stable/9/tools/regression/mac/mac_bsdextended/test_ugidfw.c Wed Jan 6 20:07:58 2016 (r293259) +++ stable/9/tools/regression/mac/mac_bsdextended/test_ugidfw.c Wed Jan 6 20:09:51 2016 (r293260) @@ -33,24 +33,19 @@ #include #include +#include #include #include -#include #include #include #include +#include +#include /* * Starting point for a regression test for mac_bsdextended(4) and the * supporting libugidfw(3). */ -void -usage(void) -{ - - fprintf(stderr, "test_ugidfw\n"); - exit(-1); -} /* * This section of the regression test passes some test cases through the @@ -68,7 +63,6 @@ static const char *test_users[] = { "operator", "bin", }; -static const int test_users_len = sizeof(test_users) / sizeof(char *); static const char *test_groups[] = { "wheel", @@ -76,7 +70,8 @@ static const char *test_groups[] = { "operator", "bin", }; -static const int test_groups_len = sizeof(test_groups) / sizeof(char *); + +int test_num; /* * List of test strings that must go in (and come out) of libugidfw intact. @@ -147,7 +142,6 @@ static const char *test_strings[] = { "object ! uid root:daemon gid daemon filesys / suid sgid uid_of_subject gid_of_subject ! type r " "mode rsx", }; -static const int test_strings_len = sizeof(test_strings) / sizeof(char *); static void test_libugidfw_strings(void) @@ -155,69 +149,83 @@ test_libugidfw_strings(void) struct mac_bsdextended_rule rule; char errorstr[256]; char rulestr[256]; - int i, error; + int error, i; - for (i = 0; i < test_users_len; i++) { + for (i = 0; i < nitems(test_users); i++, test_num++) { if (getpwnam(test_users[i]) == NULL) - err(-1, "test_libugidfw_strings: getpwnam: %s", - test_users[i]); + printf("not ok %d # test_libugidfw_strings: getpwnam(%s) " + "failed: %s\n", test_num, test_users[i], strerror(errno)); + else + printf("ok %d\n", test_num); } - for (i = 0; i < test_groups_len; i++) { + for (i = 0; i < nitems(test_groups); i++, test_num++) { if (getgrnam(test_groups[i]) == NULL) - err(-1, "test_libugidfw_strings: getgrnam: %s", - test_groups[i]); + printf("not ok %d # test_libugidfw_strings: getgrnam(%s) " + "failed: %s\n", test_num, test_groups[i], strerror(errno)); + else + printf("ok %d\n", test_num); } - for (i = 0; i < test_strings_len; i++) { + for (i = 0; i < nitems(test_strings); i++) { error = bsde_parse_rule_string(test_strings[i], &rule, sizeof(errorstr), errorstr); if (error == -1) - errx(-1, "bsde_parse_rule_string: '%s' (%d): %s", - test_strings[i], i, errorstr); + printf("not ok %d # bsde_parse_rule_string: '%s' (%d) " + "failed: %s\n", test_num, test_strings[i], i, errorstr); + else + printf("ok %d\n", test_num); + test_num++; + error = bsde_rule_to_string(&rule, rulestr, sizeof(rulestr)); if (error < 0) - errx(-1, "bsde_rule_to_string: rule for '%s' " - "returned %d", test_strings[i], error); + printf("not ok %d # bsde_rule_to_string: rule for '%s' " + "returned %d\n", test_num, test_strings[i], error); + else + printf("ok %d\n", test_num); + test_num++; if (strcmp(test_strings[i], rulestr) != 0) - errx(-1, "test_libugidfw: '%s' in, '%s' out", - test_strings[i], rulestr); + printf("not ok %d # test_libugidfw: '%s' in, '%s' " + "out\n", test_num, test_strings[i], rulestr); + else + printf("ok %d\n", test_num); + test_num++; } } int -main(int argc, char *argv[]) +main(void) { char errorstr[256]; int count, slots; - if (argc != 1) - usage(); + test_num = 1; /* Print an error if a non-root user attemps to run the tests. */ if (getuid() != 0) { - fprintf(stderr, "Error! Only root may run this utility\n"); - return (EXIT_FAILURE); + printf("1..0 # SKIP you must be root\n"); + return (0); } - /* - * We can test some parts of the library without the MAC Framework - * and policy loaded, so run those tests before calling - * mac_is_present(). - */ - test_libugidfw_strings(); - switch (mac_is_present("bsdextended")) { case -1: - err(-1, "mac_is_present"); + printf("1..0 # SKIP mac_is_present failed: %s\n", + strerror(errno)); + return (0); case 1: break; case 0: default: - errx(-1, "mac_bsdextended not loaded"); + printf("1..0 # SKIP mac_bsdextended not loaded\n"); + return (0); } + printf("1..%lu\n", nitems(test_users) + nitems(test_groups) + + 3 * nitems(test_strings) + 2); + + test_libugidfw_strings(); + /* * Some simple up-front checks to see if we're able to query the * policy for basic state. We want the rule count to be 0 before @@ -226,13 +234,19 @@ main(int argc, char *argv[]) */ count = bsde_get_rule_count(sizeof(errorstr), errorstr); if (count == -1) - errx(-1, "bsde_get_rule_count: %s", errorstr); - if (count != 0) - errx(-1, "bsde_get_rule_count: %d rules", count); + printf("not ok %d # bsde_get_rule_count: %s\n", test_num, + errorstr); + else + printf("ok %d\n", test_num); + + test_num++; slots = bsde_get_rule_slots(sizeof(errorstr), errorstr); if (slots == -1) - errx(-1, "bsde_get_rule_slots: %s", errorstr); + printf("not ok %d # bsde_get_rule_slots: %s\n", test_num, + errorstr); + else + printf("ok %d\n", test_num); return (0); } From owner-svn-src-stable-9@freebsd.org Fri Jan 8 00:05:22 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38A29A67B3C; Fri, 8 Jan 2016 00:05:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 062FC1D62; Fri, 8 Jan 2016 00:05:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0805LEs003662; Fri, 8 Jan 2016 00:05:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0805Lsw003661; Fri, 8 Jan 2016 00:05:21 GMT (envelope-from np@FreeBSD.org) Message-Id: <201601080005.u0805Lsw003661@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 8 Jan 2016 00:05:21 +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: r293397 - stable/9/sys/dev/cxgbe 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 00:05:22 -0000 Author: np Date: Fri Jan 8 00:05:20 2016 New Revision: 293397 URL: https://svnweb.freebsd.org/changeset/base/293397 Log: MFC r279969: cxgbe(4): fix if_media handling for T520-BT cards. 1Gbps and 100Mbps are valid for this card. Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Thu Jan 7 23:26:16 2016 (r293396) +++ stable/9/sys/dev/cxgbe/t4_main.c Fri Jan 8 00:05:20 2016 (r293397) @@ -2655,9 +2655,6 @@ build_medialist(struct port_info *pi) switch(pi->port_type) { case FW_PORT_TYPE_BT_XFI: - ifmedia_add(media, m | IFM_10G_T, data, NULL); - break; - case FW_PORT_TYPE_BT_XAUI: ifmedia_add(media, m | IFM_10G_T, data, NULL); /* fall through */ From owner-svn-src-stable-9@freebsd.org Fri Jan 8 00:07:39 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5018A67C8B; Fri, 8 Jan 2016 00:07:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83367122A; Fri, 8 Jan 2016 00:07:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0807csN003882; Fri, 8 Jan 2016 00:07:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0807bKX003868; Fri, 8 Jan 2016 00:07:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201601080007.u0807bKX003868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 8 Jan 2016 00:07:37 +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: r293400 - in stable/9: lib/libpam/modules/pam_ssh secure/lib/libssh secure/libexec/sftp-server secure/libexec/ssh-keysign secure/libexec/ssh-pkcs11-helper secure/usr.bin/scp secure/usr.... 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 00:07:40 -0000 Author: bdrewery Date: Fri Jan 8 00:07:37 2016 New Revision: 293400 URL: https://svnweb.freebsd.org/changeset/base/293400 Log: MFC r291941: Replace unneeded manual dependency on header by adding it to SRCS. Modified: stable/9/lib/libpam/modules/pam_ssh/Makefile stable/9/secure/lib/libssh/Makefile stable/9/secure/libexec/sftp-server/Makefile stable/9/secure/libexec/ssh-keysign/Makefile stable/9/secure/libexec/ssh-pkcs11-helper/Makefile stable/9/secure/usr.bin/scp/Makefile stable/9/secure/usr.bin/sftp/Makefile stable/9/secure/usr.bin/ssh-add/Makefile stable/9/secure/usr.bin/ssh-agent/Makefile stable/9/secure/usr.bin/ssh-keygen/Makefile stable/9/secure/usr.bin/ssh-keyscan/Makefile stable/9/secure/usr.bin/ssh/Makefile stable/9/secure/usr.sbin/sshd/Makefile Directory Properties: stable/9/lib/libpam/ (props changed) stable/9/secure/lib/libssh/ (props changed) stable/9/secure/libexec/sftp-server/ (props changed) stable/9/secure/libexec/ssh-keysign/ (props changed) stable/9/secure/libexec/ssh-pkcs11-helper/ (props changed) stable/9/secure/usr.bin/scp/ (props changed) stable/9/secure/usr.bin/sftp/ (props changed) stable/9/secure/usr.bin/ssh/ (props changed) stable/9/secure/usr.bin/ssh-add/ (props changed) stable/9/secure/usr.bin/ssh-agent/ (props changed) stable/9/secure/usr.bin/ssh-keygen/ (props changed) stable/9/secure/usr.bin/ssh-keyscan/ (props changed) stable/9/secure/usr.sbin/sshd/ (props changed) Modified: stable/9/lib/libpam/modules/pam_ssh/Makefile ============================================================================== --- stable/9/lib/libpam/modules/pam_ssh/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/lib/libpam/modules/pam_ssh/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -12,6 +12,7 @@ SRCS+= roaming_dummy.c WARNS?= 3 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT} LDADD= -lssh -lcrypto -lcrypt @@ -20,5 +21,3 @@ USEPRIVATELIB= ssh .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/lib/libssh/Makefile ============================================================================== --- stable/9/secure/lib/libssh/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/lib/libssh/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -31,9 +31,11 @@ SRCS+= bcrypt_pbkdf.c blowfish.c bsd-mis SRCS+= getrrsetbyname.c CFLAGS+= -I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h +SRCS+= krb5_config.h DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBMD} ${LIBROKEN} LDADD+= -lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken .endif @@ -50,8 +52,3 @@ LDADD+= -lcrypto -lcrypt -lz .include .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h -.if ${MK_KERBEROS_SUPPORT} != "no" -${OBJS} ${POBJS} ${SOBJS}: krb5_config.h -.endif Modified: stable/9/secure/libexec/sftp-server/Makefile ============================================================================== --- stable/9/secure/libexec/sftp-server/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/libexec/sftp-server/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -6,6 +6,7 @@ PROG= sftp-server SRCS= sftp-server.c sftp-common.c sftp-server-main.c MAN= sftp-server.8 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -22,5 +23,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/libexec/ssh-keysign/Makefile ============================================================================== --- stable/9/secure/libexec/ssh-keysign/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/libexec/ssh-keysign/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -6,6 +6,7 @@ PROG= ssh-keysign SRCS= ssh-keysign.c roaming_dummy.c readconf.c MAN= ssh-keysign.8 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h BINMODE=4555 DPADD= ${LIBSSH} @@ -18,5 +19,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/libexec/ssh-pkcs11-helper/Makefile ============================================================================== --- stable/9/secure/libexec/ssh-pkcs11-helper/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/libexec/ssh-pkcs11-helper/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -6,6 +6,7 @@ PROG= ssh-pkcs11-helper SRCS= ssh-pkcs11.c ssh-pkcs11-helper.c MAN= ssh-pkcs11-helper.8 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -22,5 +23,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/scp/Makefile ============================================================================== --- stable/9/secure/usr.bin/scp/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/scp/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -5,6 +5,7 @@ PROG= scp SRCS= scp.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -21,5 +22,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/sftp/Makefile ============================================================================== --- stable/9/secure/usr.bin/sftp/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/sftp/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -5,6 +5,7 @@ PROG= sftp SRCS= sftp.c sftp-client.c sftp-common.c sftp-glob.c progressmeter.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -21,5 +22,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/ssh-add/Makefile ============================================================================== --- stable/9/secure/usr.bin/ssh-add/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/ssh-add/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -5,6 +5,7 @@ PROG= ssh-add SRCS+= ssh-add.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -21,5 +22,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/ssh-agent/Makefile ============================================================================== --- stable/9/secure/usr.bin/ssh-agent/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/ssh-agent/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -5,6 +5,7 @@ PROG= ssh-agent SRCS= ssh-agent.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -21,5 +22,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/ssh-keygen/Makefile ============================================================================== --- stable/9/secure/usr.bin/ssh-keygen/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/ssh-keygen/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -5,6 +5,7 @@ PROG= ssh-keygen SRCS= ssh-keygen.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h .if !defined(NO_SHARED) # required when linking with a dynamic libssh @@ -21,5 +22,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/ssh-keyscan/Makefile ============================================================================== --- stable/9/secure/usr.bin/ssh-keyscan/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/ssh-keyscan/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -5,6 +5,7 @@ PROG= ssh-keyscan SRCS= ssh-keyscan.c roaming_dummy.c CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h DPADD= ${LIBSSH} LDADD= -lssh @@ -16,5 +17,3 @@ LDADD+= -lcrypt -lcrypto -lz .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h Modified: stable/9/secure/usr.bin/ssh/Makefile ============================================================================== --- stable/9/secure/usr.bin/ssh/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.bin/ssh/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -3,7 +3,6 @@ .include PROG= ssh -CFLAGS+=-I${SSHDIR} -include ssh_namespace.h LINKS= ${BINDIR}/ssh ${BINDIR}/slogin MAN= ssh.1 ssh_config.5 MLINKS= ssh.1 slogin.1 @@ -15,12 +14,16 @@ SRCS= ssh.c readconf.c clientloop.c ssht # gss-genr.c really belongs in libssh; see src/secure/lib/libssh/Makefile SRCS+= gss-genr.c +CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h + DPADD= ${LIBSSH} ${LIBUTIL} LDADD= -lssh -lutil USEPRIVATELIB= ssh .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h +SRCS+= krb5_config.h DPADD+= ${LIBGSSAPI} LDADD+= -lgssapi .endif @@ -39,8 +42,3 @@ CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h -.if ${MK_KERBEROS_SUPPORT} != "no" -${OBJS} ${POBJS} ${SOBJS}: krb5_config.h -.endif Modified: stable/9/secure/usr.sbin/sshd/Makefile ============================================================================== --- stable/9/secure/usr.sbin/sshd/Makefile Fri Jan 8 00:05:47 2016 (r293399) +++ stable/9/secure/usr.sbin/sshd/Makefile Fri Jan 8 00:07:37 2016 (r293400) @@ -24,6 +24,7 @@ SRCS+= gss-genr.c MAN= sshd.8 sshd_config.5 CFLAGS+=-I${SSHDIR} -include ssh_namespace.h +SRCS+= ssh_namespace.h DPADD= ${LIBSSH} ${LIBUTIL} ${LIBWRAP} ${LIBPAM} LDADD= -lssh -lutil -lwrap ${MINUSLPAM} @@ -37,6 +38,7 @@ LDADD+= -lbsm .if ${MK_KERBEROS_SUPPORT} != "no" CFLAGS+= -include krb5_config.h +SRCS+= krb5_config.h DPADD+= ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \ ${LIBCOM_ERR} ${LIBROKEN} LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \ @@ -67,8 +69,3 @@ CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin .include .PATH: ${SSHDIR} - -${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h -.if ${MK_KERBEROS_SUPPORT} != "no" -${OBJS} ${POBJS} ${SOBJS}: krb5_config.h -.endif From owner-svn-src-stable-9@freebsd.org Sat Jan 9 21:33:32 2016 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DC1EA6ADA7; Sat, 9 Jan 2016 21:33:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A6B01C90; Sat, 9 Jan 2016 21:33:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u09LXV2K034010; Sat, 9 Jan 2016 21:33:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u09LXVsU034009; Sat, 9 Jan 2016 21:33:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201601092133.u09LXVsU034009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 9 Jan 2016 21:33:31 +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: r293615 - stable/9/contrib/bsnmp/lib 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-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 21:33:32 -0000 Author: ngie Date: Sat Jan 9 21:33:31 2016 New Revision: 293615 URL: https://svnweb.freebsd.org/changeset/base/293615 Log: MFstable/10 r276677: MFC r276319: Fix the function signatures when MK_CRYPT == no for snmp_get_local_keys and snmp_passwd_to_keys Modified: stable/9/contrib/bsnmp/lib/snmpcrypto.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/bsnmp/ (props changed) Modified: stable/9/contrib/bsnmp/lib/snmpcrypto.c ============================================================================== --- stable/9/contrib/bsnmp/lib/snmpcrypto.c Sat Jan 9 21:28:56 2016 (r293614) +++ stable/9/contrib/bsnmp/lib/snmpcrypto.c Sat Jan 9 21:33:31 2016 (r293615) @@ -366,7 +366,7 @@ snmp_pdu_decrypt(const struct snmp_pdu * return (SNMP_CODE_OK); } -int +enum snmp_code snmp_passwd_to_keys(struct snmp_user *user, char *passwd __unused) { if (user->auth_proto == SNMP_AUTH_NOAUTH && @@ -378,7 +378,7 @@ snmp_passwd_to_keys(struct snmp_user *us return (SNMP_CODE_FAILED); } -int +enum snmp_code snmp_get_local_keys(struct snmp_user *user, uint8_t *eid __unused, uint32_t elen __unused) {