]>
Commit | Line | Data |
---|---|---|
8efc0c15 | 1 | /* |
2 | ** | |
d7a582ea | 3 | ** OpenBSD replacement routines |
8efc0c15 | 4 | ** |
5 | ** Damien Miller <djm@ibs.com.au> | |
6 | ** | |
1cbe6fb2 | 7 | ** Copyright 1999 Damien Miller |
8efc0c15 | 8 | ** Copyright 1999 Internet Business Solutions |
9 | ** | |
10 | ** Permission is hereby granted, free of charge, to any person | |
11 | ** obtaining a copy of this software and associated documentation | |
12 | ** files (the "Software"), to deal in the Software without | |
13 | ** restriction, including without limitation the rights to use, copy, | |
14 | ** modify, merge, publish, distribute, sublicense, and/or sell copies | |
15 | ** of the Software, and to permit persons to whom the Software is | |
16 | ** furnished to do so, subject to the following conditions: | |
17 | ** | |
18 | ** The above copyright notice and this permission notice shall be | |
19 | ** included in all copies or substantial portions of the Software. | |
20 | ** | |
21 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | |
22 | ** KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | |
23 | ** WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE | |
24 | ** AND NONINFRINGEMENT. IN NO EVENT SHALL DAMIEN MILLER OR INTERNET | |
25 | ** BUSINESS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
26 | ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | |
27 | ** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | |
28 | ** OR OTHER DEALINGS IN THE SOFTWARE. | |
29 | ** | |
30 | ** Except as contained in this notice, the name of Internet Business | |
31 | ** Solutions shall not be used in advertising or otherwise to promote | |
32 | ** the sale, use or other dealings in this Software without prior | |
33 | ** written authorization from Internet Business Solutions. | |
34 | ** | |
35 | */ | |
36 | ||
d7a582ea | 37 | #ifndef _BSD_MISC_H |
38 | #define _BSD_MISC_H | |
8efc0c15 | 39 | |
fb723d82 | 40 | #include "config.h" |
41 | ||
42 | #ifndef HAVE_ARC4RANDOM | |
0183ea1c | 43 | unsigned int arc4random(void); |
8efc0c15 | 44 | void arc4random_stir(void); |
fb723d82 | 45 | #endif /* !HAVE_ARC4RANDOM */ |
46 | ||
47 | #ifndef HAVE_SETPROCTITLE | |
8efc0c15 | 48 | void setproctitle(const char *fmt, ...); |
fb723d82 | 49 | #endif /* !HAVE_SETPROCTITLE */ |
8efc0c15 | 50 | |
1647c2b5 | 51 | #ifndef HAVE_SETENV |
52 | int setenv(const char *name, const char *value, int overwrite); | |
53 | #endif /* !HAVE_SETENV */ | |
54 | ||
a5c9cd31 | 55 | #ifndef HAVE_SETLOGIN |
56 | int setlogin(const char *name); | |
57 | #endif /* !HAVE_SETLOGIN */ | |
58 | ||
59 | #ifndef HAVE_INNETGR | |
60 | int innetgr(const char *netgroup, const char *host, | |
61 | const char *user, const char *domain); | |
62 | #endif /* HAVE_INNETGR */ | |
63 | ||
64 | #if !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) | |
65 | int seteuid(uid_t euid); | |
66 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ | |
67 | ||
d7a582ea | 68 | #endif /* _BSD_MISC_H */ |