summaryrefslogtreecommitdiffstats
path: root/source/smbd/reply.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-04-18 16:30:33 +0000
committerAndrew Tridgell <tridge@samba.org>2001-04-18 16:30:33 +0000
commit59e06b042a2efaa9fd703c637c010a231f955f3e (patch)
tree5132fb00e1b778a2748e4fe6f725e86cd8812247 /source/smbd/reply.c
parent625d0385226adfdcce19bbc6a641464f2497c6b3 (diff)
downloadsamba-59e06b042a2efaa9fd703c637c010a231f955f3e.tar.gz
samba-59e06b042a2efaa9fd703c637c010a231f955f3e.tar.xz
samba-59e06b042a2efaa9fd703c637c010a231f955f3e.zip
- totally rewrote utmp handling with help from Andrew Bartlett
- move all utmp code into smbd/utmp.c - created smbd/session.c for generic session handling (utmp and pam currently) - don't link with -lcrypt when using pam - made "utmp" parameter global not per share - hook session handling in session setup not tcon - removed sily "unix realname" option - cleaned up connection.c - if session fails (eg. pam failure) user is now refused access - made sure sesison cleanup happens on server exit
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r--source/smbd/reply.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index d38600af3f5..fc77a5424f4 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -685,7 +685,7 @@ reply to a session setup command
int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize)
{
- uint16 sess_vuid;
+ int sess_vuid;
gid_t gid;
uid_t uid;
int smb_bufsize;
@@ -1049,6 +1049,11 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int
to a uid can get through without a password, on the same VC */
sess_vuid = register_vuid(uid,gid,user,current_user_info.smb_name,domain,guest);
+
+ if (sess_vuid == -1) {
+ return(ERROR(ERRDOS,ERRnoaccess));
+ }
+
SSVAL(outbuf,smb_uid,sess_vuid);
SSVAL(inbuf,smb_uid,sess_vuid);