From owner-svn-src-stable@FreeBSD.ORG Thu Sep 25 17:47:27 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 522FCD6; Thu, 25 Sep 2014 17:47:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3C1DB759; Thu, 25 Sep 2014 17:47:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8PHlROY001112; Thu, 25 Sep 2014 17:47:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8PHlRZ5001111; Thu, 25 Sep 2014 17:47:27 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409251747.s8PHlRZ5001111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 25 Sep 2014 17:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272118 - stable/10/contrib/smbfs/mount_smbfs X-SVN-Group: stable-10 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.18-1 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, 25 Sep 2014 17:47:27 -0000 Author: trasz Date: Thu Sep 25 17:47:26 2014 New Revision: 272118 URL: http://svnweb.freebsd.org/changeset/base/272118 Log: MFC r271258: Make mount_smbfs(8) preserve the "automounted" mount flag. The issue here is that we have to pass this flag as a string, in iov, because it doesn't fit in mntflags, which is an int. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/smbfs/mount_smbfs/mount_smbfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/smbfs/mount_smbfs/mount_smbfs.c ============================================================================== --- stable/10/contrib/smbfs/mount_smbfs/mount_smbfs.c Thu Sep 25 17:38:42 2014 (r272117) +++ stable/10/contrib/smbfs/mount_smbfs/mount_smbfs.c Thu Sep 25 17:47:26 2014 (r272118) @@ -81,7 +81,7 @@ main(int argc, char *argv[]) #else struct xvfsconf vfc; #endif - char *next; + char *next, *p, *val; int opt, error, mntflags, caseopt, fd; uid_t uid; gid_t gid; @@ -194,6 +194,13 @@ main(int argc, char *argv[]) }; case 'o': getmntopts(optarg, mopts, &mntflags, 0); + p = strchr(optarg, '='); + val = NULL; + if (p != NULL) { + *p = '\0'; + val = p + 1; + } + build_iovec(&iov, &iovlen, optarg, val, (size_t)-1); break; case 'c': switch (optarg[0]) {