diff options
author | Mamoru Komachi <usata@gentoo.org> | 2004-11-06 07:59:52 +0000 |
---|---|---|
committer | Mamoru Komachi <usata@gentoo.org> | 2004-11-06 07:59:52 +0000 |
commit | 09fe10e288bdf74aca687aa1089a8685c414c748 (patch) | |
tree | c91c349988916fec5254a8f12e414b1c12d3e234 /sys-libs/slang/files | |
parent | clean up deps, docs; fix install (bug #69518); error message for emake (Manif... (diff) | |
download | gentoo-2-09fe10e288bdf74aca687aa1089a8685c414c748.tar.gz gentoo-2-09fe10e288bdf74aca687aa1089a8685c414c748.tar.bz2 gentoo-2-09fe10e288bdf74aca687aa1089a8685c414c748.zip |
Added a patch to remove glibc specific calls. Thanks to Peter S. Mazinger <ps.m@gmx.net>; bug #67666. Fixed compilation on ppc-macos and LICENSE syntax.
Diffstat (limited to 'sys-libs/slang/files')
-rw-r--r-- | sys-libs/slang/files/slang-1.4.9-fsuid.patch | 35 | ||||
-rw-r--r-- | sys-libs/slang/files/slang-1.4.9.patch | 44 |
2 files changed, 45 insertions, 34 deletions
diff --git a/sys-libs/slang/files/slang-1.4.9-fsuid.patch b/sys-libs/slang/files/slang-1.4.9-fsuid.patch index 23c8e1fa66f1..c7c38c756e37 100644 --- a/sys-libs/slang/files/slang-1.4.9-fsuid.patch +++ b/sys-libs/slang/files/slang-1.4.9-fsuid.patch @@ -29,3 +29,38 @@ +#endif + #endif /* _SLANG_INCLUDE_H_ */ +--- src/sltermin.c ++++ src/sltermin.c +@@ -105,7 +105,32 @@ + * I will also look into the use of setreuid, seteuid and setregid, setegid. + * FIXME: Priority=medium + */ ++ /* If your system lacks setfsuid/getfsuid either write ++ equivalent support or dont use slang to build setuid/setgid ++ apps like Mutt */ ++ ++ if(setfsuid(getuid())==-1) ++ { ++ perror("setfsuid"); ++ return NULL; ++ } ++ if(setfsgid(getgid())==-1) ++ { ++ perror("setfsgid"); ++ return NULL; ++ } + fp = fopen (file, "rb"); ++ if(setfsuid(geteuid())==-1) ++ { ++ perror("setfsuid"); ++ return NULL; ++ } ++ if(setfsgid(getegid())==-1) ++ { ++ perror("setfsgid"); ++ return NULL; ++ } ++ + if (fp == NULL) return NULL; + + if ((12 == fread ((char *) buf, 1, 12, fp) && (MAGIC == make_integer (buf)))) diff --git a/sys-libs/slang/files/slang-1.4.9.patch b/sys-libs/slang/files/slang-1.4.9.patch index ea32f46be479..05da2f74664c 100644 --- a/sys-libs/slang/files/slang-1.4.9.patch +++ b/sys-libs/slang/files/slang-1.4.9.patch @@ -35,38 +35,14 @@ } #ifdef VMS ---- src/sltermin.c -+++ src/sltermin.c -@@ -105,7 +105,32 @@ - * I will also look into the use of setreuid, seteuid and setregid, setegid. - * FIXME: Priority=medium - */ -+ /* If your system lacks setfsuid/getfsuid either write -+ equivalent support or dont use slang to build setuid/setgid -+ apps like Mutt */ -+ -+ if(setfsuid(getuid())==-1) -+ { -+ perror("setfsuid"); -+ return NULL; -+ } -+ if(setfsgid(getgid())==-1) -+ { -+ perror("setfsgid"); -+ return NULL; -+ } - fp = fopen (file, "rb"); -+ if(setfsuid(geteuid())==-1) -+ { -+ perror("setfsuid"); -+ return NULL; -+ } -+ if(setfsgid(getegid())==-1) -+ { -+ perror("setfsgid"); -+ return NULL; -+ } -+ - if (fp == NULL) return NULL; +--- src/slmisc.c.mps 2003-03-23 08:06:40.000000000 +0100 ++++ src/slmisc.c 2004-09-17 12:28:44.000000000 +0200 +@@ -565,7 +565,7 @@ + return (int) SLatol (s); + } - if ((12 == fread ((char *) buf, 1, 12, fp) && (MAGIC == make_integer (buf)))) +-#if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2) ++#if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !defined(__UCLIBC__) + extern int __libc_enable_secure; + # define HAVE___LIBC_ENABLE_SECURE 1 + #endif |