Changeset 914 in openpam for trunk/lib/libpam/pam_putenv.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_putenv.c

    r913 r914  
    4040#endif
    4141
     42#include <errno.h>
    4243#include <stdlib.h>
    4344#include <string.h>
     
    6566
    6667        /* sanity checks */
    67         if ((p = strchr(namevalue, '=')) == NULL)
     68        if ((p = strchr(namevalue, '=')) == NULL) {
     69                errno = EINVAL;
    6870                RETURNC(PAM_SYSTEM_ERR);
     71        }
    6972
    7073        /* see if the variable is already in the environment */
Note: See TracChangeset for help on using the changeset viewer.