diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-11-01 22:17:19 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-11-01 22:17:19 +0000 |
commit | 56dc17378b978f02f8397071021be5bf9a88b6a4 (patch) | |
tree | 5c18cf03ff5c2bc67b2cfcc1f9b04bba22f30c96 | |
parent | 9ec7e009ca41f64ef386e8effbac2801366cca8b (diff) | |
download | samba-56dc17378b978f02f8397071021be5bf9a88b6a4.tar.gz samba-56dc17378b978f02f8397071021be5bf9a88b6a4.tar.bz2 samba-56dc17378b978f02f8397071021be5bf9a88b6a4.zip |
Merges from HEAD:
- off-by-one fix - fixes warnings about insufficent space in buffer.
- fix a memleak in uid.c - we forgot to free() the allocated struct.
(This used to be commit b8951a6551b352e4aac7e8b0ecf7fec3f2d9634e)
-rw-r--r-- | source3/smbd/lanman.c | 2 | ||||
-rw-r--r-- | source3/smbd/uid.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 0db1af6032..d8c1cc6f60 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -72,7 +72,7 @@ static int CopyExpanded(connection_struct *conn, StrnCpy(buf,src,sizeof(buf)/2); pstring_sub(buf,"%S",lp_servicename(snum)); standard_sub_conn(conn,buf,sizeof(buf)); - l = push_ascii(*dst,buf,*n-1, STR_TERMINATE); + l = push_ascii(*dst,buf,*n, STR_TERMINATE); (*dst) += l; (*n) -= l; return l; diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 9a38d6e9e2..48b9768358 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -49,6 +49,8 @@ BOOL change_to_guest(void) current_user.conn = NULL; current_user.vuid = UID_FIELD_INVALID; + passwd_free(&pass); + return True; } |