summaryrefslogtreecommitdiffstats
path: root/source/client/cifs.upcall.c
Commit message (Collapse)AuthorAgeFilesLines
* cifs.upcall: make most functions static and silence compiler warningsJeff Layton2008-09-151-7/+11
| | | | | | | | ...to silence -Wmissing-prototypes and some uninit'ed variable warnings. Thanks to GD for the extra-paranoid compiler flags. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit bc5274eb66ebe40aea3ab917a20f2f353172ca93)
* cifs.upcall: bump SPNEGO msg version number and don't reject old versionsJeff Layton2008-08-281-2/+2
| | | | | | | | | | | | | When we added the ability for the kernel to send sec=mskrb5 to the upcall, we subtly broke old cifs.upcall versions that don't understand it. Bump the spnego message version to 2 to make this clear. Also, change cifs.upcall to not reject requests with a version that's lower than the current one, and to send the reply with the same version that the request sent. The idea is to try and keep cifs.upcall backward compatible with old kernels. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 2744bcbf3f22102911b5a3c4676e7d2f970a86eb)
* cifs.upcall: fix build warningJeff Layton2008-08-281-1/+2
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit dffb2d8eea03bb75224c3d8b4d0ab210993c645a)
* cifs.upcall: handle MSKRB5 OID properlyJeff Layton2008-08-281-5/+13
| | | | | | | | | | | When the kernel sends the upcall a sec=mskrb5 parameter, that means the the MSKRB5 OID is preferred by the server. This patch fixes the upcall to use that OID in place of the "normal" krb5 OID when it gets a sec=mskrb5 parameter. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve French <smfrench@gmail.com> (cherry picked from commit 3d96409c115b3ad4ef29ff75e40b39a26e316afe)
* Revert "cifs.upcall: handle MSKRB5 OID properly"Karolin Seeger2008-08-271-13/+5
| | | | This reverts commit 64ebfe4b2e5b7e3e07a0af424b35000693148e48.
* Revert "cifs.upcall: fix build warning"Karolin Seeger2008-08-271-2/+1
| | | | This reverts commit b3a8b823361d6144f14c2d800e956f26ff9ad6d6.
* cifs.upcall: fix build warningJeff Layton2008-08-221-1/+2
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit dffb2d8eea03bb75224c3d8b4d0ab210993c645a)
* cifs.upcall: handle MSKRB5 OID properlyJeff Layton2008-08-211-5/+13
| | | | | | | | | | | When the kernel sends the upcall a sec=mskrb5 parameter, that means the the MSKRB5 OID is preferred by the server. This patch fixes the upcall to use that OID in place of the "normal" krb5 OID when it gets a sec=mskrb5 parameter. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve French <smfrench@gmail.com> (cherry picked from commit 3d96409c115b3ad4ef29ff75e40b39a26e316afe)
* cifs.upcall: negatively instantiate keys on errorJeff Layton2008-08-181-2/+10
| | | | | | | | | | | | | | | When a request-key upcall exits without instantiating a key, the kernel will negatively instantiate the key with a 60s timeout. Older kernels, however seem to also link that key into the session keyring. This behavior can interefere with subsequent mount attempts until the key times out. The next request_key() call will get this negative key even if the upcall would have worked the second time. Fix this by having cifs.upcall negatively instantiate the key itself with a 1s timeout and don't attach it to the session keyring. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 7e05ff65a7907bf34e2d422f7c941002cfb86971)
* Building cifs.upcall is giving this build warning:Steve French2008-08-181-1/+1
| | | | | | | | | | client/cifs.upcall.c:205: warning: function declaration isn’t a prototype This patch fixes this by properly declaring usage() args as void. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@samba.org> (cherry picked from commit 7b25c4d2363ee772eed44174c882a7fbc59f0568)
* cifs.upcall: fix manpage and commentsSteve French2008-08-181-4/+4
| | | | | | | | | | | | | The "cifs.resolver" key type has been changed to "dns_resolver". Fix the comments at the top of cifs.upcall and the manpage accordingly. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@samba.org> --- docs-xml/manpages-3/cifs.upcall.8.xml | 4 ++-- source/client/cifs.upcall.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (cherry picked from commit 34cf3c012e463d0ea04616308738aadea438f48b)
* cifs.upcall was not recognizing the newer name "dns_resolver" key typeSteve French2008-08-181-1/+2
| | | | | | | | (as a synonym for the older "cifs.resolver" name) when resolving host names to ip addresses for the kernel. Acked-by: Jeff Layton (cherry picked from commit 370722392d7f42f8094f574cac08a6a12e5893a3)
* cifs.upcall: fix compile warningSteve French2008-08-181-3/+3
| | | | | | | | | | | | | | | | | Steve French noticed these warnings when building cifs.upcall: Compiling client/cifs.upcall.c client/cifs.upcall.c: In function 'usage': client/cifs.upcall.c:204: warning: declaration of 'prog' shadows a global declaration client/cifs.upcall.c:33: warning: shadowed declaration is here Change the usage function to not take and arg and have it just use the global "prog" variable. Fix a typo in the log message generated when an unknown option is specified. Also getopt() always returns '?' when it sees an unknown option so there's no point in printing it out. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit bd1cf48d7e20cb534bd672bacbf3ac4a87d1a7b4)
* This patchset comprises a number of cleanups for the cifs upcallJeremy Allison2008-08-181-0/+369
binary. The biggest change is that it renames it from cifs.spnego to cifs.upcall since the cifs.spnego name really isn't applicable anymore. It also fixes a segfault when the program is run without any args and adds a manpage. Comments and/or suggestions appreciated. Signed-off-by: Jeff Layton <jlayton@redhat.com> (cherry picked from commit 1d88c3431a1abf5fe6527fcbdf43972607a317ee)