summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-08get/setcifsacl: fix bad bit-shiftsJeff Layton2-2/+2
A Coverity scan turned up this warning: 1. cifs-utils-6.2/setcifsacl.c:578:result_independent_of_operands – "(x & 0xff0000000000ULL) >> 48" is 0 regardless of the values of its operands. This occurs as the operand of assignment. ...which is entirely true. That shift should be 40 bits, not 48. Also fix a similar bug in getcifsacl.c. Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-10-08autoconf: set release to 6.2.1 for interim buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-10-04autoconf: set version to 6.2cifs-utils-6.2Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-10-04autoconf: update configure.ac a'la autoupdateJeff Layton1-22/+11
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-09-17cifs.upcall: try to use default credcache if we didn't find oneJeff Layton1-5/+14
Fedora is in the process of moving to KEYRING: credcaches which are not currently handled by cifs.upcall. We could try to detect when they're in use, but it's simpler and more robust to just try to use the default credcache whenever we don't find a FILE: or DIR: cache. Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-09-09autoconf: add another suggested package name for krb5 headersSteve French1-2/+2
Added an alternate package name for krb5 headers. Noticed the following suggestion asks for the wrong package (at least wrong for FC17) checking krb5.h presence... no checking for krb5.h... no checking krb5/krb5.h usability... no checking krb5/krb5.h presence... no checking for krb5/krb5.h... no configure: WARNING: krb5.h not found, consider installing krb5-libs-devel. Disabling cifs.upcall. [sfrench@w500smf cifs-utils]$ sudo yum install krb5-libs-devel Loaded plugins: langpacks, presto, refresh-packagekit No package krb5-libs-devel available. Error: Nothing to do [sfrench@w500smf cifs-utils]$ sudo yum install krb5-devel (installing krb5-devel worked, but not krb5-libs-devel for this version) Signed-off-by: Steve French <smfrench@gmail.com>
2013-07-30Do not rely on hardcoded path to systemd-ask-password.Michał Górny1-2/+2
Relying on hardcoded /bin/systemd-ask-password path breaks systemd that install systemd-ask-password in /usr/bin. Since both paths are supposed to be in ${PATH} and popen() passes the command to shell, just pass 'systemd-ask-password' and let the shell find it. Fixes: https://bugzilla.samba.org/show_bug.cgi?id=10054 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2013-07-22cifs-utils: Correct max string lengths v2Scott Lovenberg2-7/+17
The max size of the username, domain, and password strings are now consistent with the kernel and Microsoft's documentation. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
2013-07-18cifs-utils: fix some sparse warningsJeff Layton10-34/+26
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-07-18setcifsacl: add fallback for when plugin can't be loadedJeff Layton1-5/+87
Allow setcifsacl to function even in the case where the plugin can't be initialized. ID mapping of course won't work, but we can still allow it to accept "raw" SID strings. Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-07-08manpage: fix nouser_xattr descriptionJeff Layton1-1/+1
The manpage erroneously states that nouser_xattr is the default, when it's actually the reverse. Reported-by: Dome <domfe@tiscali.it> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-07-08autoconf: set version to 6.1.1 for interim buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-07-02cifs-utils: set version to 6.1cifs-utils-6.1Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-05-29cifs.upcall: allow users to specify dedicated keytab on command-lineJeff Layton2-3/+12
Currently cifs.upcall only looks at the default system keytab (/etc/krb5.keytab). It's often the case however that a dedicated keytab is desirable. Allow administrators to set one on the command-line. Reported-by: steve <steve@steve-ss.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-05-23cifs.upcall: the exit code should be 0 when print versionPeng Haitao1-0/+1
When print version number, the exit code should be 0 and syslog() should not send "Negating key" to the system logger. Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
2013-04-12setcifsacl.c: fix a bug of goto setcifsacl_facenum_retPeng Haitao1-2/+3
setcifsacl_facenum_ret: is called only if attrlen is equal to -1. Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
2013-04-10mount.cifs: Trivial comment fixesScott Lovenberg1-2/+2
Two trivial comment fixes. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com>
2013-04-10cifs-utils: set version to 6.0.1 for interim buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-03-25autoconf: set version to 6.0cifs-utils-6.0Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-03-22mount.cifs: remove support for "NFS syntax"Jeff Layton1-28/+10
...as promised for version 6.0. Cc: Scott Lovenberg <scott.lovenberg@gmail.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-03-20manpage: better document the default sec= mount optionJeff Layton1-9/+11
The default changed in mainline kernel v3.8. Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-03-16manpage: document the mount.cifs vers= optionJeff Layton1-0/+51
Thanks to Tom Talpey for clarifying some of the info here. Cc: Tom Talpey <ttalpey@microsoft.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-02-01cifs-utils: add autoconf test to make sure that libwbclient is usableJeff Layton1-0/+20
The idmapwb plugin requires a usable wbcSidsToUnixIds() function. Check to ensure that the wbclient library provides that symbol, and handle it appropriately if it doesn't. If someone were so inclined they probably could fix idmapwb to fall back to the older mapping functions if that symbol doesn't exist, but for now this patch just makes it refuse to build the plugin. Reported-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-29setcifsacl: fix offset calculation in "set" codeJeff Layton1-3/+4
Previously the code assumed that the ACE that was copied was of a fixed size. Save off the return value from copy_ace and ensure that we apply it correctly to the size and offset. Reported-by: Jian Li <jiali@redhat.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-28setcifsacl: fix infinite loop in getnumcacesJeff Layton2-2/+4
Jian pointed out that this loop can cycle infinitely when the string contains a ','. Also, fix typo in manpage that shows a trailing ',' in one example. Reported-by: Jian Li <jiali@redhat.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-13mount.cifs: set parsed_info->got_user when a cred file supplies a usernameJeff Layton1-1/+2
commit 85d18a1ed introduced a regression when using a credentials file. It set the username in the parsed mount info properly, but didn't set the "got_user" flag in it. Also, fix an incorrect strlcpy length specifier in open_cred_file. Reported-by: "Mantas M." <grawity@gmail.com> Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-07cifsidmap: clean up comments on API descriptionJeff Layton1-7/+7
...typo and grammatical fixes, mostly. Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-07autoconf: set release to 5.9.1 for interim buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-07autoconf: set version to 5.9cifs-utils-5.9Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-07mount.cifs: remove support for "complex" usernames from mount.cifsJeff Layton1-102/+9
In commit 569cfcb3a, we added a warning of the removal for support for username= options in the form of DOMAIN/username%password. This patch removes that support as promised prior to the 5.9 release. Signed-off-by: Jeff Layton <jlayton@samba.org>
2013-01-02cifs-utils: fix cifsidmap.h commentJeff Layton1-4/+1
It's actually OK to set this to BOTH. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-20cifs-utils: add a manpage for idmapwbJeff Layton7-18/+211
...and clean up references to winbind in various tool manpages. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-19cifs-utils: convert cifs.idmap to use plugin interfaceJeff Layton6-90/+315
Add routines for the various things that cifs.idmap needs and have it call them. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-19cifs-utils: add autoconf test for WBC_ID_TYPE_BOTHJeff Layton2-0/+18
WBC_ID_TYPE_BOTH is a new addition (in Samba 4.0 only). Add a test for its presence. Because it's an enum, we have to jump through some extra hoops here... Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-19cifs-utils: convert setcifsacl to use the plugin interfaceJeff Layton6-61/+117
Add str_to_sid() functionality to the plugin API and have setcifsacl use it. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-19cifs-utils: new plugin architecture for ID mapping codeJeff Layton7-58/+371
Currently, the ACL-related tools in cifs-utils call into the wbclient libs directly in order to do their bidding. The wbclient developers want to get away from needing to configure winbind on the clients and instead allow sssd to handle the mapping in most cases. This patch represents an initial step in that direction. It adds a plugin architecture for cifs-utils, adds wrappers around the calls into libwbclient that find an idmap plugin library to use and then has it call into that plugin to do the actual ID mapping. The application will call into a set of routines that find the correct plugin and dlopen() it. Currently the plugin is located in a well-known location that is settable via autoconf. That location is intended to be a symlink that points to the real plugin (generally under $pkglibdir). The plugin will export a number of functions with well-known names. The wrappers find those by using dlsym() and then call them. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-19cifs-utils: struct cifs_sid definition to new cifsidmap.h headerJeff Layton3-10/+40
People who want to build a plugin for the idmapping routines will need a header to describe the data types that they need. Add a cifsidmap.h file and move the struct cifs_sid definition into it, along with the constants needed to describe it. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-13setcifsacl: remove syslog goopJeff Layton1-11/+4
setcifsacl doesn't use syslog, so no need to open a channel to it. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-07getcifsacl: remove unneeded openlog() callJeff Layton1-8/+2
getcifsacl doesn't log to syslog, so there's no need to open a channel to it. Also, remove the unneeded "prog" global variable since only the usage() function needs it. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-06cifs-utils: only link in -lrt to binaries that need itJeff Layton2-2/+3
...which is really only mount.cifs. Cc: Björn Jacke <bj@sernet.de> Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-06autoconf: enable full RELRO in cifs-utils binariesJeff Layton1-1/+1
This is safer since it also protects the GOT from getting clobbered. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-04getcifsacl: ensure that we don't overrun the wbcDomainSid when convertingJeff Layton1-2/+4
If we get a SID that contains more than 15 subauthorities, we'll end up overrunning the struct wbcDomainSid. Just ignore any past 15. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-04getcifsacl: free strings returned by wbcLookupSidJeff Layton1-0/+2
Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-04getcifsacl: use "size" instead of reconverting original field to host endianJeff Layton1-2/+2
Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-04autotools: remove unnecessary files from distroJeff Layton4-1891/+0
Having them in the distro prevents autoreconf -i from installing the latest copies. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-03mount.cifs: don't pass "flag" options to the kernelJeff Layton1-16/+8
When certain options are passed to the mount helper, we want to turn them into mountflags for the mount() syscall. There's no need to copy them to the options string in that case though. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-03mount.cifs: treat uid=,gid=,cruid= options as name before assuming they're a ↵Jeff Layton1-26/+24
number Sergio Conrad reported a problem trying to set up an autofs map to do a krb5 mount. In his environment, many users have usernames that are comprised entirely of numbers. While that's a bit odd, POSIX apparently allows for it. The current code assumes that when a numeric argument is passed to one of the above options, that it's a uid or gid. Instead, try to treat the argument as a user or group name first, and only try to treat it as a number if that fails. Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-12-03autoconf: set version to 5.8.1 for interim buildsJeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-11-11autoconf: set version to 5.8cifs-utils-5.8Jeff Layton1-1/+1
Signed-off-by: Jeff Layton <jlayton@samba.org>
2012-11-09setcifsacl: fix format specifier in error messageJeff Layton1-1/+1
setcifsacl.c:833: warning: format '%ld' expects type 'long int', but argument 3 has type 'ssize_t' Signed-off-by: Jeff Layton <jlayton@samba.org>