Changeset 914 in openpam for trunk/lib/libpam/pam_getenv.c


Ignore:
Timestamp:
Jan 21, 2017, 3:15:29 PM (4 years ago)
Author:
Dag-Erling Smørgrav
Message:

In pam_*env(3), set errno as the corresponding POSIX functions would.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libpam/pam_getenv.c

    r913 r914  
    4040#endif
    4141
     42#include <errno.h>
    4243#include <stdlib.h>
    4344#include <string.h>
     
    6263
    6364        ENTERS(name);
    64         if (strchr(name, '=') != NULL)
     65        if (strchr(name, '=') != NULL) {
     66                errno = EINVAL;
    6567                RETURNS(NULL);
     68        }
    6669        if ((i = openpam_findenv(pamh, name, strlen(name))) < 0)
    6770                RETURNS(NULL);
Note: See TracChangeset for help on using the changeset viewer.