From owner-svn-src-all@freebsd.org Sun Apr 23 23:09:04 2017 Return-Path: Delivered-To: svn-src-all@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 1D5C8D4D479; Sun, 23 Apr 2017 23:09:04 +0000 (UTC) (envelope-from rmacklem@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 E36041F2E; Sun, 23 Apr 2017 23:09:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3NN93T7030903; Sun, 23 Apr 2017 23:09:03 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3NN93Tu030902; Sun, 23 Apr 2017 23:09:03 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201704232309.v3NN93Tu030902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 23 Apr 2017 23:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317350 - head/usr.sbin/nfsuserd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Apr 2017 23:09:04 -0000 Author: rmacklem Date: Sun Apr 23 23:09:02 2017 New Revision: 317350 URL: https://svnweb.freebsd.org/changeset/base/317350 Log: Fix the default uid/gid values in nfsuserd.c This patch sets the default uid/gid values for "nobody" and "nogroup" to the values in the password and group databases. Normally nfsuserd(8) will override these with whatever is in the password/group databases, so these values are only used when the databases entries aren't available. It would be nice to use the definitions in sys/conf.h, but those are in the _KERNEL section of the file. Reported by: tez@pkgsrc.org Submitted by: tez@pkgsrc.org MFC after: 2 weeks Modified: head/usr.sbin/nfsuserd/nfsuserd.c Modified: head/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.c Sun Apr 23 22:31:12 2017 (r317349) +++ head/usr.sbin/nfsuserd/nfsuserd.c Sun Apr 23 23:09:02 2017 (r317350) @@ -88,9 +88,9 @@ struct info { u_char *dnsname = "default.domain"; u_char *defaultuser = "nobody"; -uid_t defaultuid = (uid_t)32767; +uid_t defaultuid = 65534; u_char *defaultgroup = "nogroup"; -gid_t defaultgid = (gid_t)32767; +gid_t defaultgid = 65533; int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; pid_t slaves[MAXNFSUSERD];