1 #ifndef _LIB_OPENBSD_H_
2 #define _LIB_OPENBSD_H_
6 /* API definitions lifted from OpenBSD src/include */
9 int auth_userokay(char *, char *, char *, char *);
12 #define LOGIN_SETGROUP 0x0001 /* Set group */
13 #define LOGIN_SETLOGIN 0x0002 /* Set login */
14 #define LOGIN_SETPATH 0x0004 /* Set path */
15 #define LOGIN_SETPRIORITY 0x0008 /* Set priority */
16 #define LOGIN_SETRESOURCES 0x0010 /* Set resource limits */
17 #define LOGIN_SETUMASK 0x0020 /* Set umask */
18 #define LOGIN_SETUSER 0x0040 /* Set user */
19 #define LOGIN_SETENV 0x0080 /* Set environment */
20 #define LOGIN_SETALL 0x00ff /* Set all. */
22 typedef struct login_cap login_cap_t;
24 int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned int);
27 #define _PW_NAME_LEN 63
30 void * reallocarray(void *optr, size_t nmemb, size_t size);
31 long long strtonum(const char *numstr, long long minval,
32 long long maxval, const char **errstrp);
35 void explicit_bzero(void *, size_t);
38 int execvpe(const char *, char *const *, char *const *);
39 int setresuid(uid_t, uid_t, uid_t);