Ignore:
Timestamp:
Mar 12, 2008, 9:08:18 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.28a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/smbd/chgpasswd.c

    r1 r124  
    127127        gid_t gid;
    128128        uid_t uid;
     129        char * const eptrs[1] = { NULL };
    129130
    130131        if (pass == NULL)
     
    154155                return (False);
    155156        }
    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)
    157164        if (ioctl(slave, I_FIND, "ptem") == 0) {
    158165                ioctl(slave, I_PUSH, "ptem");
     
    160167        if (ioctl(slave, I_FIND, "ldterm") == 0) {
    161168                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); */
    168169        }
    169170#endif
     
    223224
    224225        /* 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)
    226227        {
    227228                DEBUG(3, ("Bad status returned from %s\n", passwordprogram));
     
    499500        if (lp_pam_password_change()) {
    500501                BOOL ret;
     502#ifdef HAVE_SETLOCALE
     503                char *prevlocale = setlocale(LC_ALL, "C");
     504#endif
    501505
    502506                if (as_root)
     
    511515                if (as_root)
    512516                        unbecome_root();
     517
     518#ifdef HAVE_SETLOCALE
     519                setlocale(LC_ALL, prevlocale);
     520#endif
    513521
    514522                return ret;
Note: See TracChangeset for help on using the changeset viewer.