Changeset 124 for branches/samba-3.0/source/smbd/chgpasswd.c
- Timestamp:
- Mar 12, 2008, 9:08:18 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/smbd/chgpasswd.c
r1 r124 127 127 gid_t gid; 128 128 uid_t uid; 129 char * const eptrs[1] = { NULL }; 129 130 130 131 if (pass == NULL) … … 154 155 return (False); 155 156 } 156 #if defined(I_PUSH) && defined(I_FIND) 157 #if defined(TIOCSCTTY) 158 if (ioctl(slave, TIOCSCTTY, 0) < 0) 159 { 160 DEBUG(3, ("Error in ioctl call for slave pty\n")); 161 /* return(False); */ 162 } 163 #elif defined(I_PUSH) && defined(I_FIND) 157 164 if (ioctl(slave, I_FIND, "ptem") == 0) { 158 165 ioctl(slave, I_PUSH, "ptem"); … … 160 167 if (ioctl(slave, I_FIND, "ldterm") == 0) { 161 168 ioctl(slave, I_PUSH, "ldterm"); 162 }163 #elif defined(TIOCSCTTY)164 if (ioctl(slave, TIOCSCTTY, 0) < 0)165 {166 DEBUG(3, ("Error in ioctl call for slave pty\n"));167 /* return(False); */168 169 } 169 170 #endif … … 223 224 224 225 /* execl() password-change application */ 225 if (execl ("/bin/sh", "sh", "-c", passwordprogram, NULL) < 0)226 if (execle("/bin/sh", "sh", "-c", passwordprogram, NULL, eptrs) < 0) 226 227 { 227 228 DEBUG(3, ("Bad status returned from %s\n", passwordprogram)); … … 499 500 if (lp_pam_password_change()) { 500 501 BOOL ret; 502 #ifdef HAVE_SETLOCALE 503 char *prevlocale = setlocale(LC_ALL, "C"); 504 #endif 501 505 502 506 if (as_root) … … 511 515 if (as_root) 512 516 unbecome_root(); 517 518 #ifdef HAVE_SETLOCALE 519 setlocale(LC_ALL, prevlocale); 520 #endif 513 521 514 522 return ret;
Note:
See TracChangeset
for help on using the changeset viewer.