summaryrefslogtreecommitdiff
path: root/source/smbd/ipc.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-08-09 18:05:34 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-08-09 18:05:34 +0000
commit2b9475cc5fda4b272f19c4f168d3f00363c8042b (patch)
treeba4f27c6d20f620cd819a04ad172081c5e6f2ce6 /source/smbd/ipc.c
parent6567bac5d13f32729fe51eba1e904268c6ee00be (diff)
downloadsamba-2b9475cc5fda4b272f19c4f168d3f00363c8042b.tar.gz
applying login updates from jim@oxfordcc.co.uk, sent in by
lewis2@server.uwindsor.ca. rest of this patch to follow. bug in interface.c - uninitialised pointer. nmbd has 0x20 as well as 0x0 NetBIOS name when lmhosts entry is added. lkcl
Diffstat (limited to 'source/smbd/ipc.c')
-rw-r--r--source/smbd/ipc.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 415c939bf38..f4f18079225 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -59,6 +59,9 @@ extern fstring local_machine;
#define SNLEN 15 /* service name length */
#define QNLEN 12 /* queue name maximum length */
+#define MAJOR_VERSION 2
+#define MINOR_VERSION 0
+
extern int Client;
static int CopyExpanded(int cnum, int snum, char** dst, char* src, int* n)
@@ -1406,14 +1409,16 @@ static BOOL api_SetUserPassword(int cnum,int uid, char *param,char *data,
*rdata_len = 0;
- SSVAL(*rparam,0,NERR_Success);
+ SSVAL(*rparam,0,NERR_badpass);
SSVAL(*rparam,2,0); /* converter word */
DEBUG(3,("Set password for <%s>\n",user));
- if (!password_ok(user,pass1,strlen(pass1),NULL,False) ||
- !chgpasswd(user,pass1,pass2))
- SSVAL(*rparam,0,NERR_badpass);
+ if (password_ok(user,pass1,strlen(pass1),NULL,False) &&
+ chgpasswd(user,pass1,pass2))
+ {
+ SSVAL(*rparam,0,NERR_Success);
+ }
bzero(pass1,sizeof(fstring));
bzero(pass2,sizeof(fstring));
@@ -1740,9 +1745,10 @@ static BOOL api_RNetServerGetInfo(int cnum,int uid, char *param,char *data,
}
if (servers) free(servers);
- SCVAL(p,0,2); /* version_major */
- SCVAL(p,1,0); /* version_minor */
+ SCVAL(p,0,MAJOR_VERSION);
+ SCVAL(p,1,MINOR_VERSION);
SIVAL(p,2,servertype);
+
if (mdrcnt == struct_len) {
SIVAL(p,6,0);
} else {
@@ -1817,8 +1823,8 @@ static BOOL api_NetWkstaGetInfo(int cnum,int uid, char *param,char *data,
p2 = skip_string(p2,1);
p += 4;
- SCVAL(p,0,2); /* major version?? */
- SCVAL(p,1,1); /* minor version?? */
+ SCVAL(p,0,MAJOR_VERSION);
+ SCVAL(p,1,MINOR_VERSION);
p += 2;
SIVAL(p,0,PTR_DIFF(p2,*rdata));