diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.c | 9 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.h | 6 |
4 files changed, 17 insertions, 5 deletions
@@ -1,4 +1,5 @@ | |||
1 | 20010409 | 1 | 20010409 |
2 | - (stevesk) use setresgid() for setegid() if needed | ||
2 | - (stevesk) configure.in: typo | 3 | - (stevesk) configure.in: typo |
3 | - OpenBSD CVS Sync | 4 | - OpenBSD CVS Sync |
4 | - stevesk@cvs.openbsd.org 2001/04/08 16:01:36 | 5 | - stevesk@cvs.openbsd.org 2001/04/08 16:01:36 |
@@ -4965,4 +4966,4 @@ | |||
4965 | - Wrote replacements for strlcpy and mkdtemp | 4966 | - Wrote replacements for strlcpy and mkdtemp |
4966 | - Released 1.0pre1 | 4967 | - Released 1.0pre1 |
4967 | 4968 | ||
4968 | $Id: ChangeLog,v 1.1086 2001/04/08 22:50:44 stevesk Exp $ | 4969 | $Id: ChangeLog,v 1.1087 2001/04/09 14:50:52 stevesk Exp $ |
diff --git a/configure.in b/configure.in index e794c3e7d..b391eac15 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.in,v 1.273 2001/04/08 22:50:43 stevesk Exp $ | 1 | # $Id: configure.in,v 1.274 2001/04/09 14:50:54 stevesk Exp $ |
2 | 2 | ||
3 | AC_INIT(ssh.c) | 3 | AC_INIT(ssh.c) |
4 | 4 | ||
@@ -471,7 +471,7 @@ AC_ARG_WITH(tcp-wrappers, | |||
471 | ) | 471 | ) |
472 | 472 | ||
473 | dnl Checks for library functions. | 473 | dnl Checks for library functions. |
474 | AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop) | 474 | AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop) |
475 | dnl Checks for time functions | 475 | dnl Checks for time functions |
476 | AC_CHECK_FUNCS(gettimeofday time) | 476 | AC_CHECK_FUNCS(gettimeofday time) |
477 | dnl Checks for libutil functions | 477 | dnl Checks for libutil functions |
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 6f92e064f..eb3a5407e 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "xmalloc.h" | 26 | #include "xmalloc.h" |
27 | #include "ssh.h" | 27 | #include "ssh.h" |
28 | 28 | ||
29 | RCSID("$Id: bsd-misc.c,v 1.3 2001/03/13 23:38:20 mouring Exp $"); | 29 | RCSID("$Id: bsd-misc.c,v 1.4 2001/04/09 14:50:56 stevesk Exp $"); |
30 | 30 | ||
31 | char *get_progname(char *argv0) | 31 | char *get_progname(char *argv0) |
32 | { | 32 | { |
@@ -70,6 +70,13 @@ int seteuid(uid_t euid) | |||
70 | } | 70 | } |
71 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ | 71 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ |
72 | 72 | ||
73 | #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) | ||
74 | int setegid(uid_t egid) | ||
75 | { | ||
76 | return(setresgid(-1,egid,-1)); | ||
77 | } | ||
78 | #endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ | ||
79 | |||
73 | #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) | 80 | #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) |
74 | const char *strerror(int e) | 81 | const char *strerror(int e) |
75 | { | 82 | { |
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h index 61443b81c..2ca0f3704 100644 --- a/openbsd-compat/bsd-misc.h +++ b/openbsd-compat/bsd-misc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | /* $Id: bsd-misc.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ | 25 | /* $Id: bsd-misc.h,v 1.3 2001/04/09 14:50:56 stevesk Exp $ */ |
26 | 26 | ||
27 | #ifndef _BSD_MISC_H | 27 | #ifndef _BSD_MISC_H |
28 | #define _BSD_MISC_H | 28 | #define _BSD_MISC_H |
@@ -52,6 +52,10 @@ int innetgr(const char *netgroup, const char *host, | |||
52 | int seteuid(uid_t euid); | 52 | int seteuid(uid_t euid); |
53 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ | 53 | #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ |
54 | 54 | ||
55 | #if !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) | ||
56 | int setegid(uid_t egid); | ||
57 | #endif /* !defined(HAVE_SETEGID) && defined(HAVE_SETRESGID) */ | ||
58 | |||
55 | #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) | 59 | #if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR) |
56 | const char *strerror(int e); | 60 | const char *strerror(int e); |
57 | #endif | 61 | #endif |