Skip to content

Commit 09fe7ba

Browse files
jtlaytonSteve French
authored andcommitted
[CIFS] implement upcalls for SPNEGO blob via keyctl API
Add routines to handle upcalls to userspace via keyctl for the purpose of getting a SPNEGO blob for a particular uid and server combination. Clean up the Makefile a bit and set it up to only compile cifs_spnego if CONFIG_CIFS_UPCALL is set. Also change CONFIG_CIFS_UPCALL to depend on CONFIG_KEYS rather than CONFIG_CONNECTOR. cifs_spnego.h defines the communications between kernel and userspace and is intended to be shared with userspace programs. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
1 parent 745542e commit 09fe7ba

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎fs/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ config CIFS_EXPERIMENTAL
20072007
config CIFS_UPCALL
20082008
bool "Kerberos/SPNEGO advanced session setup (EXPERIMENTAL)"
20092009
depends on CIFS_EXPERIMENTAL
2010-
depends on CONNECTOR
2010+
depends on KEYS
20112011
help
20122012
Enables an upcall mechanism for CIFS which will be used to contact
20132013
userspace helper utilities to provide SPNEGO packaged Kerberos

‎fs/cifs/Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
#
44
obj-$(CONFIG_CIFS) += cifs.o
55

6-
cifs-objs := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o md4.o md5.o cifs_unicode.o nterr.o xattr.o cifsencrypt.o fcntl.o readdir.o ioctl.o sess.o export.o cifsacl.o
6+
cifs-y := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o \
7+
link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o \
8+
md4.o md5.o cifs_unicode.o nterr.o xattr.o cifsencrypt.o fcntl.o \
9+
readdir.o ioctl.o sess.o export.o cifsacl.o
10+
11+
cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o

‎fs/cifs/cifsproto.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ extern void header_assemble(struct smb_hdr *, char /* command */ ,
7676
extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
7777
struct cifsSesInfo *ses,
7878
void **request_buf);
79+
extern struct key *cifs_get_spnego_key(struct cifsSesInfo *sesInfo,
80+
const char *hostname);
7981
extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses,
8082
const int stage,
8183
const struct nls_table *nls_cp);

0 commit comments

Comments
 (0)