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

    r913 r914  
    4040#endif
    4141
     42#include <errno.h>
    4243#include <stdlib.h>
    4344#include <stdio.h>
     
    6869
    6970        /* sanity checks */
    70         if (*name == '\0' || strchr(name, '=') != NULL)
     71        if (*name == '\0' || strchr(name, '=') != NULL) {
     72                errno = EINVAL;
    7173                RETURNC(PAM_SYSTEM_ERR);
     74        }
    7275
    7376        /* is it already there? */
Note: See TracChangeset for help on using the changeset viewer.