From nobody@FreeBSD.org  Mon Oct  8 13:31:50 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7661016A41B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Oct 2007 13:31:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F3F513C458
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  8 Oct 2007 13:31:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l98DVoLM027956
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 8 Oct 2007 13:31:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l98DVoUQ027934;
	Mon, 8 Oct 2007 13:31:50 GMT
	(envelope-from nobody)
Message-Id: <200710081331.l98DVoUQ027934@www.freebsd.org>
Date: Mon, 8 Oct 2007 13:31:50 GMT
From: Tom Evans <tevans.uk@googlemail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mount_smbfs(8) doesn't document -U (username) argument
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         117013
>Category:       docs
>Synopsis:       mount_smbfs(8) doesn't document -U (username) argument
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 13:40:00 GMT 2007
>Closed-Date:    Sat Jul 21 15:46:40 UTC 2012
>Last-Modified:  Sat Jul 21 15:46:40 UTC 2012
>Originator:     Tom Evans
>Release:        7-CURRENT
>Organization:
Mintel
>Environment:
FreeBSD zoot.mintel.co.uk 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed Oct  3 11:47:24 BST 2007     root@zoot.mintel.co.uk:/usr/obj/usr/src/sys/ZOOT  i386
>Description:
Whilst looking to add a username option to mount_smbfs(8), I noticed that one actually already existed, but was not documented in mount_smbfs(8). This patch just adds documentation for the switch.
>How-To-Repeat:
'man 8 mount_smbfs'
>Fix:
Apply attached patch

Patch attached with submission follows:

--- /usr/src/contrib/smbfs/mount_smbfs/mount_smbfs.8	2007-06-29 11:54:58.000000000 +0100
+++ mount_smbfs.8	2007-10-04 13:06:15.000000000 +0100
@@ -13,6 +13,7 @@
 .Op Fl L Ar locale
 .Op Fl M Ar crights : Ns Ar srights
 .Op Fl N
+.Op Fl U Ar username
 .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
 .Op Fl R Ar retrycount
 .Op Fl T Ar timeout
@@ -68,6 +69,8 @@
 If no password is found,
 .Nm
 prompts for it.
+.It Fl U Ar username
+Use specified username to authenticate with.
 .It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
 Assign owner/group attributes to the newly created connection.
 .It Fl R Ar retrycount


>Release-Note:
>Audit-Trail:

From: Maxim Konovalov <maxim@macomnet.ru>
To: Tom Evans <tevans.uk@googlemail.com>
Cc: bug-followup@freebsd.org
Subject: Re: docs/117013: mount_smbfs(8) doesn't document -U (username)
 argument
Date: Fri, 12 Oct 2007 20:25:52 +0400 (MSD)

 > Patch attached with submission follows:
 >
 > --- /usr/src/contrib/smbfs/mount_smbfs/mount_smbfs.8	2007-06-29 11:54:58.000000000 +0100
 > +++ mount_smbfs.8	2007-10-04 13:06:15.000000000 +0100
 > @@ -13,6 +13,7 @@
 >  .Op Fl L Ar locale
 >  .Op Fl M Ar crights : Ns Ar srights
 >  .Op Fl N
 > +.Op Fl U Ar username
 >  .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
 >  .Op Fl R Ar retrycount
 >  .Op Fl T Ar timeout
 > @@ -68,6 +69,8 @@
 >  If no password is found,
 >  .Nm
 >  prompts for it.
 > +.It Fl U Ar username
 > +Use specified username to authenticate with.
 >  .It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
 >  Assign owner/group attributes to the newly created connection.
 >  .It Fl R Ar retrycount
 >
 Does it really work?  If yes you need to update usage() in
 mount_smbfs.c.
 
 Speaking aside it's not clear why do you need -U when the mount
 specification has a user part: //user@server/share.
 
 -- 
 Maxim Konovalov

From: Tom Evans <tevans.uk@googlemail.com>
To: bug-followup@FreeBSD.org, tevans.uk@googlemail.com
Cc:  
Subject: Re: docs/117013: mount_smbfs(8) doesn't document -U (username)
	argument
Date: Tue, 23 Oct 2007 16:31:37 +0100

 --=-oc6/tBYJBxZR45KehEpd
 Content-Type: multipart/mixed; boundary="=-UB8N//8Ee+puw4brtl4c"
 
 
 --=-UB8N//8Ee+puw4brtl4c
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 Yes, it really works. The options are parsed in smb_ctx_init() in
 contrib/smbfs/lib/smb/ctx.c, which also sets the  charset (-E) and the
 locale (-L). The -U flag is ignored by the other opt parsing routine in
 the same file, smb_ctx_opt().
 
 Attached is a patch that updates the usage as well.
 
 =20
 
 --=-UB8N//8Ee+puw4brtl4c
 Content-Disposition: attachment; filename=mount_smbfs.diff.txt
 Content-Type: text/x-patch; name=mount_smbfs.diff.txt; charset=UTF-8
 Content-Transfer-Encoding: base64
 
 ZGlmZiAtTnViQiAteCAnKi5zdz8nIG1vdW50X3NtYmZzLm9yaWcvbW91bnRfc21iZnMuOCBtb3Vu
 dF9zbWJmcy9tb3VudF9zbWJmcy44DQotLS0gbW91bnRfc21iZnMub3JpZy9tb3VudF9zbWJmcy44
 CTIwMDctMTAtMTYgMTE6MjQ6MTUuMDAwMDAwMDAwICswMTAwDQorKysgbW91bnRfc21iZnMvbW91
 bnRfc21i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AIC0y
 OTksNyArMjk5LDcgQEANCiAJInVzYWdlOiBtb3VudF9zbWJmcyBbLUUgY3MxOmNzMl0gWy1JIGhv
 c3RdIFstTCBsb2NhbGVdIFstTSBjcmlnaHRzOnNyaWdodHNdIiwNCiAJIiAgICAgICAgICAgICAg
 ICAgICBbLU5dIFstTyBjb3duZXI6Y2dyb3VwL3Nvd25lcjpzZ3JvdXBdIFstUiByZXRyeWNvdW50
 XSIsDQogCSIgICAgICAgICAgICAgICAgICAgWy1UIHRpbWVvdXRdIFstVyB3b3JrZ3JvdXBdIFst
 YyBjYXNlXSBbLWQgbW9kZV0gWy1mIG1vZGVdIiwNCi0JIiAgICAgICAgICAgICAgICAgICBbLWcg
 Z2lkXSBbLW4gb3B0XSBbLXUgdWlkXSAvL3VzZXJAc2VydmVyL3NoYXJlIG5vZGUiKTsNCisJIiAg
 ICAgICAgICAgICAgICAgICBbLWcgZ2lkXSBbLW4gb3B0XSBbLXUgdWlkXSBbLVUgdXNlcm5hbWVd
 IC8vdXNlckBzZXJ2ZXIvc2hhcmUgbm9kZSIpOw0KIA0KIAlleGl0ICgxKTsNCiB9DQo=
 
 
 --=-UB8N//8Ee+puw4brtl4c--
 
 --=-oc6/tBYJBxZR45KehEpd
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (FreeBSD)
 
 iD8DBQBHHhPZlcRvFfyds/cRAtO2AKCIKr8nPP3CQyPspOAJvIbnUUQAawCgphjE
 HEmMll4wpoXnfiehGbMUK7k=
 =d8kN
 -----END PGP SIGNATURE-----
 
 --=-oc6/tBYJBxZR45KehEpd--
 

From: Tom Evans <tevans.uk@googlemail.com>
To: bug-followup@FreeBSD.org, tevans.uk@googlemail.com
Cc:  
Subject: Re: docs/117013: mount_smbfs(8) doesn't document -U (username)
	argument
Date: Wed, 24 Oct 2007 10:09:52 +0100

 --=-BGXGkYjBsjg+5wSZB3wh
 Content-Type: text/plain
 Content-Transfer-Encoding: 7bit
 
 Hmm, doesn't really handle MIME, base64 does it? 
 
 I'll try again with a non signed version..
 
 As to why I wanted the option, fstab doesn't allow quoting of the mount
 point, which means a samba username with spaces in it cannot be
 specified there. I was hoping that by using an option to mount_smbfs,
 the username could be specified instead in the mountopts section of the
 fstab entry (also impossible). 
 
 It is largely irrelevant, since neither work, so I worked around the
 issue with a custom rc script. This change is merely to document
 undocumented features.
 
 Tom
 
 BTW, the interface to the PR system is truly awful - why the hell can a
 PR only be updated by email? It is truly pap.
 
 --=-BGXGkYjBsjg+5wSZB3wh
 Content-Disposition: attachment; filename=mount_smbfs.diff.txt
 Content-Type: text/x-patch; name=mount_smbfs.diff.txt; charset=UTF-8
 Content-Transfer-Encoding: 7bit
 
 diff -NubB -x '*.sw?' mount_smbfs.orig/mount_smbfs.8 mount_smbfs/mount_smbfs.8
 --- mount_smbfs.orig/mount_smbfs.8	2007-10-16 11:24:15.000000000 +0100
 +++ mount_smbfs/mount_smbfs.8	2007-10-23 16:00:39.000000000 +0100
 @@ -13,6 +13,7 @@
  .Op Fl L Ar locale
  .Op Fl M Ar crights : Ns Ar srights
  .Op Fl N
 +.Op Fl U Ar username
  .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
  .Op Fl R Ar retrycount
  .Op Fl T Ar timeout
 @@ -68,6 +69,8 @@
  If no password is found,
  .Nm
  prompts for it.
 +.It Fl U Ar username
 +Use specified username to authenticate with
  .It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
  Assign owner/group attributes to the newly created connection.
  .It Fl R Ar retrycount
 diff -NubB -x '*.sw?' mount_smbfs.orig/mount_smbfs.c mount_smbfs/mount_smbfs.c
 --- mount_smbfs.orig/mount_smbfs.c	2007-10-16 11:24:15.000000000 +0100
 +++ mount_smbfs/mount_smbfs.c	2007-10-23 16:00:14.000000000 +0100
 @@ -299,7 +299,7 @@
  	"usage: mount_smbfs [-E cs1:cs2] [-I host] [-L locale] [-M crights:srights]",
  	"                   [-N] [-O cowner:cgroup/sowner:sgroup] [-R retrycount]",
  	"                   [-T timeout] [-W workgroup] [-c case] [-d mode] [-f mode]",
 -	"                   [-g gid] [-n opt] [-u uid] //user@server/share node");
 +	"                   [-g gid] [-n opt] [-u uid] [-U username] //user@server/share node");
  
  	exit (1);
  }
 
 --=-BGXGkYjBsjg+5wSZB3wh--
 

From: Tom Rhodes <trhodes@FreeBSD.org>
To: tevans.uk@googlemail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/117013: mount_smbfs(8) doesn't document -U (username)
 argument
Date: Sun, 18 Jan 2009 09:02:27 -0500

 Hi,
 
 [SNIP]: Patch and PR data
 
 I'm looking at the code in contrib/smbfs/mount_smbfs and I don't
 see the code for a -U option in the getopt() or switch statement.
 Am I missing something?  Thanks,
 
 -- 
 Tom Rhodes
State-Changed-From-To: open->feedback 
State-Changed-By: trhodes 
State-Changed-When: Sun Jan 18 14:55:31 UTC 2009 
State-Changed-Why:  
Feedback in the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117013 

From: Tom Evans <tevans.uk@googlemail.com>
To: bug-followup@FreeBSD.org, tevans.uk@googlemail.com
Cc:  
Subject: Re: docs/117013: mount_smbfs(8) doesn't document -U (username)
	argument
Date: Tue, 20 Jan 2009 09:21:51 +0000

 Yes, there is no arg parsing code in smbfs/mount_smbfs/mount_smbfs.c
 that parses the -U flag. It is done inside of smbfs/lib/smb/ctx.c, in
 the smb_ctx_init() function, which then calls smb_ctx_setuser().
 smb_ctx_init() is called from smbfs/mount_smbfs/mount_smbfs.c:131 (in my
 RELENG_7 sources anyway.)
 
 I found this when I was adding my own -U flag to mount_smbfs :)
 
 Cheers
 
 Tom
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/117013: commit references a PR
Date: Thu, 22 Jan 2009 08:29:49 +0000 (UTC)

 Author: trhodes
 Date: Thu Jan 22 08:29:39 2009
 New Revision: 187583
 URL: http://svn.freebsd.org/changeset/base/187583
 
 Log:
   Document the "-U" option.  While it is not part of the
   getopt(), it is accepted through smb_ctx_init() in
   lib/smb/ctx.c.
   
   PR:		117013
   Submitted by:	Tom Evans <tevans.uk@googlemail.com> (original version)
 
 Modified:
   head/contrib/smbfs/mount_smbfs/mount_smbfs.8
   head/contrib/smbfs/mount_smbfs/mount_smbfs.c
 
 Modified: head/contrib/smbfs/mount_smbfs/mount_smbfs.8
 ==============================================================================
 --- head/contrib/smbfs/mount_smbfs/mount_smbfs.8	Thu Jan 22 08:14:28 2009	(r187582)
 +++ head/contrib/smbfs/mount_smbfs/mount_smbfs.8	Thu Jan 22 08:29:39 2009	(r187583)
 @@ -1,6 +1,6 @@
  .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $
  .\" $FreeBSD$
 -.Dd March 10, 2000
 +.Dd January 21, 2008
  .Dt MOUNT_SMBFS 8
  .Os
  .Sh NAME
 @@ -16,6 +16,7 @@
  .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
  .Op Fl R Ar retrycount
  .Op Fl T Ar timeout
 +.Op Fl U Ar username
  .Op Fl W Ar workgroup
  .Op Fl c Ar case
  .Op Fl d Ar mode
 @@ -77,6 +78,8 @@ Default is 4.
  .It Fl T Ar timeout
  Timeout in seconds for each request.
  Default is 15.
 +.It Fl U Ar username
 +Username to authenticate with.
  .It Fl W Ar workgroup
  This option specifies the workgroup to be used in the authentication request.
  .It Fl c Ar case
 
 Modified: head/contrib/smbfs/mount_smbfs/mount_smbfs.c
 ==============================================================================
 --- head/contrib/smbfs/mount_smbfs/mount_smbfs.c	Thu Jan 22 08:14:28 2009	(r187582)
 +++ head/contrib/smbfs/mount_smbfs/mount_smbfs.c	Thu Jan 22 08:29:39 2009	(r187583)
 @@ -295,7 +295,7 @@ usage(void)
  	"usage: mount_smbfs [-E cs1:cs2] [-I host] [-L locale] [-M crights:srights]",
  	"                   [-N] [-O cowner:cgroup/sowner:sgroup] [-R retrycount]",
  	"                   [-T timeout] [-W workgroup] [-c case] [-d mode] [-f mode]",
 -	"                   [-g gid] [-n opt] [-u uid] //user@server/share node");
 +	"                   [-g gid] [-n opt] [-u uid] [-U username] //user@server/share node");
  
  	exit (1);
  }
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->patched 
State-Changed-By: trhodes 
State-Changed-When: Thu Jan 22 08:33:10 UTC 2009 
State-Changed-Why:  
Patch applied to CURRENT with a minor change, thanks! 


Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Thu Jan 22 08:33:10 UTC 2009 
Responsible-Changed-Why:  
Over to me, MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117013 

From: Garrett Cooper <yanegomi@gmail.com>
To: bug-followup@FreeBSD.org, tevans.uk@googlemail.com
Cc:  
Subject: Re: docs/117013: mount_smbfs(8) doesn't document -U (username)
 argument
Date: Tue, 11 Oct 2011 18:29:24 -0700 (PDT)

  	This has been resolved on all supported branches. Please close this PR.
 Thanks,
 -Garrett
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Sat Jul 21 15:46:23 UTC 2012 
State-Changed-Why:  
Changes have been merged for awhile now, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117013 
>Unformatted:
