summaryrefslogtreecommitdiffstats
path: root/source/smbd/chgpasswd.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>1999-06-13 04:14:24 +0000
committerTim Potter <tpot@samba.org>1999-06-13 04:14:24 +0000
commit36d7cb4ccc42268e8e6a7b783c945d1853624958 (patch)
treec88a5771d7d903fca6dee44422122298b9adaff3 /source/smbd/chgpasswd.c
parentafe5be3cf62b90100861e2433ea885f5d6f8708c (diff)
downloadsamba-36d7cb4ccc42268e8e6a7b783c945d1853624958.tar.gz
samba-36d7cb4ccc42268e8e6a7b783c945d1853624958.tar.xz
samba-36d7cb4ccc42268e8e6a7b783c945d1853624958.zip
Moved code that changes the pw_passwd entry (i.e shadow password and
weird unixware stuff) into _Get_Pwnam() to fix a memory allocation bug. Note that the Get_Pwnam() function now returns a const struct passwd * as a hint to other developers not to change entries in the struct passwd.
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r--source/smbd/chgpasswd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index 734f72c08da..f84ae0ccb59 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/smbd/chgpasswd.c
@@ -110,7 +110,7 @@ static int dochild(int master,char *slavedev, char *name, char *passwordprogram,
{
int slave;
struct termios stermios;
- struct passwd *pass = Get_Pwnam(name,True);
+ const struct passwd *pass = Get_Pwnam(name,True);
int gid;
int uid;