Changeset 204 in openpam


Ignore:
Timestamp:
Feb 8, 2003, 9:13:00 PM (15 years ago)
Author:
Dag-Erling Smørgrav
Message:

Apparently, nobody ever uses pam_getenv(3), because nobody has ever
complained that it didn't work. Make it return a pointer to the
actual value of the requested environment variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_getenv.c

    r203 r204  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/pam_getenv.c#11 $
     34 * $P4: //depot/projects/openpam/lib/pam_getenv.c#12 $
    3535 */
    3636
     
    6363        if ((i = openpam_findenv(pamh, name, strlen(name))) == -1)
    6464                RETURNS(NULL);
    65         str = strdup(pamh->env[i]);
     65        for (str = pamh->env[i]; *str != '\0'; ++str) {
     66                if (*str == '=') {
     67                        ++str;
     68                        break;
     69                }
     70        }
    6671        RETURNS(str);
    6772}
Note: See TracChangeset for help on using the changeset viewer.