| Summary: | mount_smbfs(8) doesn't document -U (username) argument | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Tom Evans <tevans.uk> | ||||||
| Component: | Books & Articles | Assignee: | Tom Rhodes <trhodes> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | ||||||||
| Priority: | Normal | ||||||||
| Version: | Latest | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Tom Evans
2007-10-08 14:40:00 UTC
> >
> --- /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
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. 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 Feedback in the PR. 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 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 Patch applied to CURRENT with a minor change, thanks! Responsible Changed From-To: freebsd-doc->trhodes Over to me, MFC reminder. This has been resolved on all supported branches. Please close this PR. Thanks, -Garrett State Changed From-To: patched->closed Changes have been merged for awhile now, thanks. |