summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-01-14mount.cifs: add cruid= mount optionJeff Layton2-2/+43
Allow admins to pass in a username for the cruid= mount option. Signed-off-by: Jeff Layton <jlayton@samba.org> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
2011-01-14mount.cifs: clean up handling of uid= and gid=Jeff Layton1-46/+52
The handling of these options is quite convoluted. Change it so that these options are stored as numbers and then appended to the option strings. Signed-off-by: Jeff Layton <jlayton@samba.org> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
2011-01-14cifs.upcall: add keytab support for unattended mountsJeff Layton1-0/+78
Based on a patch from a few years ago by Igor Mammedov. This patch adds the ability for cifs.upcall to establish a TGT using the system-default keytab. Signed-off-by: Jeff Layton <jlayton@samba.org> Acked-by: Igor Mammedov <niallain@gmail.com>
2011-01-14cifs.upcall: debug logging for the key description parserJeff Layton1-0/+8
Signed-off-by: Jeff Layton <jlayton@samba.org> Acked-by: Igor Mammedov <niallain@gmail.com>
2011-01-14cifs.upcall: save off username field from key descriptionJeff Layton1-0/+17
Signed-off-by: Jeff Layton <jlayton@samba.org> Acked-by: Igor Mammedov <niallain@gmail.com>
2011-01-14cifs.upcall: clean up key description decoding routineJeff Layton1-14/+16
...and switch the code to using strndup. Check for allocation errors as well, and fix some off-by-one bugs in the ones that decode strings. Signed-off-by: Jeff Layton <jlayton@samba.org> Acked-by: Igor Mammedov <niallain@gmail.com>
2011-01-14cifs.upcall: consolidate find_krb5_cc callsJeff Layton1-15/+13
Signed-off-by: Jeff Layton <jlayton@samba.org> Acked-by: Igor Mammedov <niallain@gmail.com>
2011-01-05cifs.upcall: fix crash when trying to free uninitialized varJeff Layton1-2/+1
If cifs.upcall is passed an invalid argument then it will "goto out". The decoded_args struct however is uninitialized at that point so it will usually segfault when trying to free fields in it. Move the initialization up in the function. Signed-off-by: Jeff Layton <jlayton@samba.org>
2011-01-05cifs.upcall: add 'l' to getopt_long stringJeff Layton1-1/+1
Reported-by: Stefan Walter <walteste@inf.ethz.ch> Signed-off-by: Jeff Layton <jlayton@samba.org> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
2011-01-05manpage: change port option descriptionPavel Shilovsky1-1/+1
Provide changes according to new ip/port connection logic in CIFS. Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
2010-12-28cifs.upcall: use krb5_auth_con_set_req_cksumtype() and pass a GSSAPI ↵Stefan Metzmacher2-0/+41
checksum (bug #7890) Some closed source SMB servers doesn't support all checksum types, so we should try to match windows clients. This is almost the same logic which is used by Samba. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-12-28cifs.upcall: use krb5_auth_con_init() to create an explicit auth_contextStefan Metzmacher1-2/+12
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-12-28cifs.upcall: fix memory and call krb5_auth_con_free()Stefan Metzmacher1-1/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-12-14cifs-utils: fixes for manpage pathname replacement schemeJeff Layton1-2/+6
Fix up some small problems with pathname replacement: 1) replace the bare 'sed' with $(SED) 2) '\@' is apparently not portable, so we need to use a different scheme in case we end up using a non-typical sed binary. 3) do the sed conversion to a new file and then move it into place. If sed falls down halfway through the conversion we could end up with a half-baked manpage. 4) use the $@ construct for brevity and maintainability 5) add a comment so that the rationale behind this is explained Many thanks to several folks inside Red Hat who pointed out these issues. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-12-09cifs-utils: rewrite hardcoded paths in manpagesJeff Layton3-2/+9
Currently the manpages (particularly cifs.upcall.8) have hardcoded paths in them that need to be manually adjusted. Replace those paths with @sbindir@ and add a makefile target that will use sed to replace those paths with the ones set by autoconf. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-12-09mount.cifs: manpage: add entry for "actimeo" optionSuresh Jayaraman1-0/+18
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-12-09cifs-utils: bump version number to 4.7.1 for interim buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-10-19autoconf: bump release to 4.7cifs-utils-4.7Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-10-08manpage: add mount.cifs manpage entry for "multiuser" optionJeff Layton1-0/+7
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-10-08mount.cifs: reinstate ip= as an override for address resolutionJeff Layton1-1/+5
The manpage says: ip=arg sets the destination IP address. This option is set automatically if the server name portion of the requested UNC name can be resolved so rarely needs to be specified by the user. ...but recent changes have made it not work anymore as an override if someone specifies an ip= option as part of the mount options. Reinstate that behavior by copying the ip= option verbatim into the addrlist of the parsed options struct and then skipping the name resolution. That should allow the ip= option to pass unadulterated to the kernel. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-08-24mount.cifs: use monotonic time for timeoutsBjörn Jacke1-3/+20
this is especially important during the boot process, where the clock is often being set initially and clock jumps are more common.
2010-08-24autoconf: add checks for clock_gettimeBjörn Jacke1-0/+10
2010-08-20cifs-utils: infrastructure for stashing passwords in keyringIgor Druzhinin3-2/+600
It is a userspace part of a new infrastructure for stashing passwords in kernel keyring per user basis. The patch adds the "cifscreds" utility for management keys with credentials. Assembling of the utility from the distribution is possible with --enable-cifscreds=yes option of configure script. Signed-off-by: Igor Druzhinin <jaxbrigs@gmail.com>
2010-08-20cifs-utils: moving resolve_host into separate fileIgor Druzhinin4-93/+153
The resolve_host routine from mount.cifs is carried out in separate file and appropriate corrections are made. Signed-off-by: Igor Druzhinin <jaxbrigs@gmail.com>
2010-08-04mount.cifs: remove redundant error assignmentSuresh Jayaraman1-4/+4
Avoid setting error code twice by moving error handling out of add_mtab_exit block. We already set error code and report error in other places. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-08-04autoconf: bump version number to 4.6.1 for non-release buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-30autoconf: bump version to 4.6cifs-utils-4.6Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27data_blob: change for loop indices to a unsigned intJeff Layton1-2/+2
To silence these warnings: data_blob.c: In function ‘data_blob_hex_string_lower’: data_blob.c:155:16: warning: comparison between signed and unsigned integer expressions data_blob.c: In function ‘data_blob_hex_string_upper’: data_blob.c:172:16: warning: comparison between signed and unsigned integer expressions Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27cifs.upcall: swap c99 initializers for memset callsJeff Layton1-2/+6
gcc says: cifs.upcall.c: In function ‘cifs_krb5_get_req’: cifs.upcall.c:261:2: warning: missing initializer cifs.upcall.c:261:2: warning: (near initialization for ‘in_creds.client’) cifs.upcall.c: In function ‘main’: cifs.upcall.c:622:9: warning: missing initializer cifs.upcall.c:622:9: warning: (near initialization for ‘arg.ver’) ...this is probably just gcc being balky, but we can silence the warning. It may also be a micro optimization in an error condition if we delay zeroing out the struct until it's needed. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27mtab: add __attribute__((unused)) to unused variablesJeff Layton1-2/+2
...to silence -Wextra warnings. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27automake: add -Wextra to CFLAGSJeff Layton1-1/+1
...for extra warning goodness. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27mount.cifs: document the 'fsc' mount optionSuresh Jayaraman1-0/+7
Changes since last post: - added the information about the kernel CONFIG option - also added the information that caching is currently enabled for files opened as read-only Document the newly added local caching feature using FS-Cache. This patch could be queued and considered once the local caching patches gets merged upstream. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-07-27mount.cifs: clarify 'fsc' mount optionSuresh Jayaraman1-3/+6
Changes since last post: - added the information about the kernel CONFIG option - also added the information that caching is currently enabled for files opened as read-only Document the newly added local caching feature using FS-Cache. This patch could be queued and considered once the local caching patches gets merged upstream. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-07-27autoconf: bump version to 4.5.2Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27mount.cifs: add 'fsc' mount option to the usage help textSuresh Jayaraman1-1/+1
Add 'fsc' mount option to the 'Less commonly used options' section of mount.cifs usage help text. As with the previous patch, this one too could be queued and considered once the local caching patches gets merged upstream. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-07-27manpages: document 'fsc' mount optionSuresh Jayaraman1-0/+17
Document the newly added local caching feature using FS-Cache. This patch could be queued and considered once the local caching patches gets merged upstream. Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
2010-07-27mount.cifs: handle the "mand" and "nomand" mount options (try #2)Jeff Layton1-2/+12
These are filesystem-independent mount options that get passed to mount.cifs too. Handle them appropriately by enabling and disabling MS_MANDLOCK and not handing them off to the kernel. Also, don't set MS_MANDLOCK by default. There's no reason to ask the kernel to enforce mandatory locking by default. This also matches up better with the way that "mand" is set in the mtab. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-27mount.cifs: ignore the "_netdev" mount optionJeff Layton1-0/+5
This mount options is used to clue in init scripts that the filesystem shouldn't be mounted until networking is available. /bin/mount also passes that option to the filesystem however, and cifs currently chokes on it. mount.nfs ignores this option -- have mount.cifs do the same. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-26cifs.upcall: require a uid= or creduid= parmJeff Layton1-0/+5
Even though all known kernels send the uid= parm to userspace, cifs.upcall doesn't technically require it. It should though. If one wasn't sent for some reason, then the setuid wouldn't occur. Error out if there is no uid= or creduid= parm. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-23cifs.upcall: use "creduid=" parm by default when availableJeff Layton2-6/+35
When I did the original krb5 implementation, I goofed and ended up making it so that when someone specifies the "uid=" mount option that also affects the owner of the krb5 credential cache and not just the ownership of the mount. I'm proposing a patch for the kernel to attempt to fix this by making the kernel send a "creduid=" parameter in the upcall which is intended to be the user that should own the credentials cache. That's not necessarily the same user that has "ownership" of the mount. Usually the creduid= will be set to the real uid of the user doing the mounting. When multisession mounts are introduced they will usually set this to the fsuid that walks into the mount. To ease the transition, this patch also adds a command line switch that makes cifs.upcall use the "legacy" uid= parameter instead. Use that if you want it to behave like it used to. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-07-07mount.cifs: switch to using _PATH_MNTTAB and paths.hJeff Layton1-4/+4
The code currently uses fstab.h and _PATH_FSTAB, but uClibc apparently doesn't have that header. It does have paths.h and _PATH_MNTTAB however and so does glibc, so use that instead. Fixes samba bug #7539. Reported-and-Tested-by: Armin Kuster <linux@kama-aina.net> Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-06-16mount.cifs: use original device name as-is for mtabJeff Layton1-1/+1
We don't want to alter the device name in any way for the mtab as /bin/umount depends on the string being identical for user mounts. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-06-06mount.cifs: accept all supported values for dir_modeScott Lovenberg1-1/+1
The option parsing function now accepts all values for 'dir_mode' that are supported by the kernel side code. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
2010-06-06cifs-utils: bump version number to 4.5.1Jeff Layton1-1/+1
...to distinguish interim builds from official releases. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-05-30mount.cifs: fix parsing of "cred=" optionJeff Layton1-0/+2
When the mount option parsing was cleaned up recently, the detection of the "cred=" option was dropped. Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-05-21cifs-utils: bump version number to 4.5cifs-utils-4.5Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-05-14mount.cifs: cosmetic alignment patchScott Lovenberg1-3/+3
Align CRED_ macro values to keep style consistent with last patch. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
2010-05-14mount.cifs: clean up option parsingScott Lovenberg1-74/+189
Moved option string parsing to function parse_opt_token(char*). Main loop in parse_options(const char*, struct parsed_mount_info*) transplanted to a switch block. The parsing function folds common options to a single macro: 1.) 'unc','target', and 'path' -> 'OPT_UNC' 2.) 'dom*' and 'workg*' -> 'OPT_DOM' 3.) 'nobrl' and 'nolock' -> 'OPT_NO_LOCK' Kept 'fmask' and 'dmask' (OPT_FMASK, OPT_DMASK), which fall through to 'file_mode' and 'dir_mode' in the main loop. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
2010-05-14mount.cifs: unitialized variable in cred parsing error pathSteve French1-4/+4
Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2010-05-11mount.cifs: turn into a multicall binary for smb2Steve French1-15/+68
mount.smb2 has different help (many fewer mount options) and different fsname, but otherwise can reuse all of the good work Jeff did on mount.cifs. This patch allow mount.cifs to detect if run as mount.smb2 (to display different help and fsname). Signed-off-by: Steve French <smfrench@gmail.com>