Bugzilla – Attachment 489 Details for
Bug 645
Configure mis-identifies setresgid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check setresuid for "not implemented", take 2.
openssh-setresuid.patch (text/plain), 2.88 KB, created by
Darren Tucker
on 2003-10-27 18:19:46 AEDT
(
hide
)
Description:
Check setresuid for "not implemented", take 2.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2003-10-27 18:19:46 AEDT
Size:
2.88 KB
patch
obsolete
>Index: acconfig.h >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/acconfig.h,v >retrieving revision 1.168 >diff -u -p -r1.168 acconfig.h >--- acconfig.h 15 Oct 2003 06:57:57 -0000 1.168 >+++ acconfig.h 27 Oct 2003 04:42:00 -0000 >@@ -41,6 +41,12 @@ > /* Define if your setregid() is broken */ > #undef BROKEN_SETREGID > >+/* Define if your setresuid() is broken */ >+#undef BROKEN_SETRESUID >+ >+/* Define if your setresgid() is broken */ >+#undef BROKEN_SETRESGID >+ > /* Define to a Set Process Title type if your system is */ > /* supported by bsd-setproctitle.c */ > #undef SPT_TYPE >Index: configure.ac >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v >retrieving revision 1.173 >diff -u -p -r1.173 configure.ac >--- configure.ac 15 Oct 2003 06:57:57 -0000 1.173 >+++ configure.ac 27 Oct 2003 07:17:52 -0000 >@@ -775,6 +775,30 @@ AC_CHECK_DECL(tcsendbreak, > [#include <termios.h>] > ) > >+dnl Some platorms have setresuid that isn't implemented >+AC_MSG_CHECKING(if setresuid seems to work) >+AC_TRY_RUN([ >+#include <stdlib.h> >+#include <errno.h> >+int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} >+ ], >+ [AC_MSG_RESULT(yes)], >+ [AC_DEFINE(BROKEN_SETRESUID), >+ AC_MSG_RESULT(not implemented)] >+) >+ >+dnl Some platorms have setresgid that isn't implemented >+AC_MSG_CHECKING(if setresgid seems to work) >+AC_TRY_RUN([ >+#include <stdlib.h> >+#include <errno.h> >+int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} >+ ], >+ [AC_MSG_RESULT(yes)], >+ [AC_DEFINE(BROKEN_SETRESGID) >+ AC_MSG_RESULT(not implemented)] >+) >+ > dnl Checks for time functions > AC_CHECK_FUNCS(gettimeofday time) > dnl Checks for utmp functions >Index: uidswap.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/uidswap.c,v >retrieving revision 1.40 >diff -u -p -r1.40 uidswap.c >--- uidswap.c 22 Sep 2003 02:54:37 -0000 1.40 >+++ uidswap.c 27 Oct 2003 03:57:28 -0000 >@@ -151,7 +151,7 @@ permanently_set_uid(struct passwd *pw) > debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid, > (u_int)pw->pw_gid); > >-#if defined(HAVE_SETRESGID) >+#if defined(HAVE_SETRESGID) && !defined(BROKEN_SETRESGID) > if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0) > fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); > #elif defined(HAVE_SETREGID) && !defined(BROKEN_SETREGID) >@@ -164,7 +164,7 @@ permanently_set_uid(struct passwd *pw) > fatal("setgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno)); > #endif > >-#if defined(HAVE_SETRESUID) >+#if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID) > if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) < 0) > fatal("setresuid %u: %.100s", (u_int)pw->pw_uid, strerror(errno)); > #elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 645
:
406
|
487
|
488
| 489