summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-31 12:37:56 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-31 12:37:56 +0000
commitf32cf6dfbadf15ed073a228e5f17f3186852d068 (patch)
tree7aa4b0fec30cde08894dd9ebdab17697e0b09dd7
parentbdca4e32aa1449385778d43102cce431c85f9e91 (diff)
downloadsamba-f32cf6dfbadf15ed073a228e5f17f3186852d068.tar.gz
samba-f32cf6dfbadf15ed073a228e5f17f3186852d068.tar.bz2
samba-f32cf6dfbadf15ed073a228e5f17f3186852d068.zip
This should fix up the compile with krb5.
This needs to use the auth interface at some stage, but for now this will do. (This used to be commit 8dc4f2e44b150cdcdecd2f6028bf06907ff90cad)
-rw-r--r--source3/smbd/sesssetup.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 5331127cb5..7361db0205 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -41,10 +41,8 @@ static int reply_spnego_kerberos(connection_struct *conn,
char *realm, *client, *p;
const struct passwd *pw;
char *user;
- gid_t gid;
- uid_t uid;
- char *full_name;
int sess_vuid;
+ auth_serversupplied_info *server_info = NULL;
realm = lp_realm();
@@ -101,11 +99,15 @@ static int reply_spnego_kerberos(connection_struct *conn,
DEBUG(1,("Username %s is invalid on this system\n",user));
return ERROR_NT(NT_STATUS_LOGON_FAILURE);
}
- gid = pw->pw_gid;
- uid = pw->pw_uid;
- full_name = pw->pw_gecos;
+
+ if (!make_server_info_pw(&server_info,pw)) {
+ DEBUG(1,("make_server_info_from_pw failed!\n"));
+ return ERROR_NT(NT_STATUS_NO_MEMORY);
+ }
- sess_vuid = register_vuid(uid,gid,user,user,realm,False, full_name);
+ sess_vuid = register_vuid(server_info, user, False);
+
+ free_server_info(&server_info);
if (sess_vuid == -1) {
return ERROR_NT(NT_STATUS_LOGON_FAILURE);