blob: 9d499c805085f7369a93ba31bc8c67f4b26fade2 [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
2**
Damien Miller753331e1999-12-30 01:29:35 +11003** OpenBSD replacement routines
Damien Millerd4a8b7e1999-10-27 13:42:43 +10004**
5** Damien Miller <djm@ibs.com.au>
6**
Damien Millerf20c2aa2000-01-06 20:28:41 +11007** Copyright 1999 Damien Miller
Damien Millerd4a8b7e1999-10-27 13:42:43 +10008** 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
Damien Miller753331e1999-12-30 01:29:35 +110037#ifndef _BSD_MISC_H
38#define _BSD_MISC_H
Damien Millerd4a8b7e1999-10-27 13:42:43 +100039
Damien Millere413cba1999-10-28 14:12:54 +100040#include "config.h"
41
42#ifndef HAVE_ARC4RANDOM
Damien Miller3d112ef1999-10-28 13:20:30 +100043unsigned int arc4random(void);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100044void arc4random_stir(void);
Damien Millere413cba1999-10-28 14:12:54 +100045#endif /* !HAVE_ARC4RANDOM */
46
47#ifndef HAVE_SETPROCTITLE
Damien Millerd4a8b7e1999-10-27 13:42:43 +100048void setproctitle(const char *fmt, ...);
Damien Millere413cba1999-10-28 14:12:54 +100049#endif /* !HAVE_SETPROCTITLE */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100050
Damien Millerd7702521999-11-22 16:11:05 +110051#ifndef HAVE_SETENV
52int setenv(const char *name, const char *value, int overwrite);
53#endif /* !HAVE_SETENV */
54
Damien Millere72b7af1999-12-30 15:08:44 +110055#ifndef HAVE_SETLOGIN
56int setlogin(const char *name);
57#endif /* !HAVE_SETLOGIN */
58
59#ifndef HAVE_INNETGR
60int 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)
65int seteuid(uid_t euid);
66#endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */
67
Damien Miller753331e1999-12-30 01:29:35 +110068#endif /* _BSD_MISC_H */