diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-07-08 16:54:44 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-07-08 16:54:44 +0000 |
commit | 25eae02948b40667495fbb021dd130180180a05e (patch) | |
tree | d0dffa4caed0faf7473d162528551c850c9a914b /source3/smbd/chgpasswd.c | |
parent | a67a697b3624c51d38cacd4aea134286a372b756 (diff) | |
download | samba-25eae02948b40667495fbb021dd130180180a05e.tar.gz samba-25eae02948b40667495fbb021dd130180180a05e.tar.bz2 samba-25eae02948b40667495fbb021dd130180180a05e.zip |
Makefile: Added AIX targets from Ole Holm Nielsen <Ole.H.Nielsen@uni-c.dk>
chgpasswd.c: Added Samba/GPL notice (for obvious reasons).
clitar.c: Updated Copyright date to include 1997 (for obvious reasons).
getsmbpass.c: Updated Copyright date to include 1997 (for obvious reasons).
includes.h: Added stropts for solaris.
loadparm.c: Changed comment for hide files option.
nameconf.c: Updated Copyright date to include 1997 (for obvious reasons).
nmbd.c: Updated Copyright date to include 1997 (for obvious reasons).
pcap.c: Updated Copyright date to include 1997 (for obvious reasons).
proto.h: Re-added accidentaly deleted smb_shm_ calls.
quotas.c: Added AIX quota patch from Ole Holm Nielsen <ohnielse@fysik.dtu.dk>
server.c: Optimization on calling is_hidden_path. Updated Copyrights.
smb.h: Changed DEFAULT_FILES_TO_HIDE from "*/.*" to ".*".
smbpass.c: Updated Copyright date to include 1997 (for obvious reasons).
ufc.c: Updated Copyright date to include 1997 (for obvious reasons).
util.c: Added last component code to is_in_path().
Jeremy (jallison@whistle.com)
(This used to be commit 9385ae1005f13c8ed51f1319e3949b5c8571e62d)
Diffstat (limited to 'source3/smbd/chgpasswd.c')
-rw-r--r-- | source3/smbd/chgpasswd.c | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 79ea66253d..6063f2aac8 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -1,3 +1,24 @@ +/* + Unix SMB/Netbios implementation. + Version 1.9. + Samba utility functions + Copyright (C) Andrew Tridgell 1992-1997 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + /* fork a child process to exec passwd and write to its * tty to change a users password. This is running as the * user who is attempting to change the password. @@ -38,22 +59,22 @@ extern int DEBUGLEVEL; static int findpty(char **slave) { int master; -#ifdef SVR4 +#if defined(SVR4) || defined(SUNOS5) extern char *ptsname(); -#else +#else /* defined(SVR4) || defined(SUNOS5) */ static char line[12]; void *dirp; char *dpname; -#endif +#endif /* defined(SVR4) || defined(SUNOS5) */ -#ifdef SVR4 +#if defined(SVR4) || defined(SUNOS5) if ((master = open("/dev/ptmx", O_RDWR)) >= 1) { grantpt(master); unlockpt(master); *slave = ptsname(master); return (master); } -#else +#else /* defined(SVR4) || defined(SUNOS5) */ strcpy( line, "/dev/ptyXX" ); dirp = OpenDir(-1, "/dev", True); @@ -73,7 +94,7 @@ static int findpty(char **slave) } } CloseDir(dirp); -#endif +#endif /* defined(SVR4) || defined(SUNOS5) */ return (-1); } @@ -87,9 +108,9 @@ static int dochild(int master,char *slavedev, char *name, char *passwordprogram) #ifdef USE_SETRES setresuid(0,0,0); -#else +#else /* USE_SETRES */ setuid(0); -#endif +#endif /* USE_SETRES */ /* Start new session - gets rid of controlling terminal. */ if (setsid() < 0) { @@ -103,15 +124,15 @@ static int dochild(int master,char *slavedev, char *name, char *passwordprogram) slavedev)); return(False); } -#ifdef SVR4 +#if defined(SVR4) || defined(SUNOS5) ioctl(slave, I_PUSH, "ptem"); ioctl(slave, I_PUSH, "ldterm"); -#else +#else /* defined(SVR4) || defined(SUNOS5) */ if (ioctl(slave,TIOCSCTTY,0) <0) { DEBUG(3,("Error in ioctl call for slave pty\n")); /* return(False); */ } -#endif +#endif /* defined(SVR4) || defined(SUNOS5) */ /* Close master. */ close(master); |