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