summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2003-11-26 10:12:18 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2003-11-26 10:12:18 +0000
commit9ebb94c98ea89a15d738d02f07ab5a63220e851b (patch)
tree032944951185b4889d8cf6764857c1b3ce3dfa26 /modules
parentd49298dd5398d34fe4cfd035d416c6ee126f5c95 (diff)
Relevant BUGIDs: 849541
Purpose of commit: cleanup Commit summary: --------------- pam_rhosts_auth.c included sys/fsuid.h twice on Linux and uses "#ifdef linux" instead the correct "#ifdef __linux__".
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_rhosts/pam_rhosts_auth.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/pam_rhosts/pam_rhosts_auth.c b/modules/pam_rhosts/pam_rhosts_auth.c
index adaf16c9..95a1aad3 100644
--- a/modules/pam_rhosts/pam_rhosts_auth.c
+++ b/modules/pam_rhosts/pam_rhosts_auth.c
@@ -42,7 +42,7 @@
#define USER_RHOSTS_FILE "/.rhosts" /* prefixed by user's home dir */
-#ifdef linux
+#ifdef __linux__
#include <endian.h>
#endif
@@ -74,13 +74,6 @@ int innetgr(const char *, const char *, const char *,const char *);
#include <ctype.h>
#include <net/if.h>
-#ifdef linux
-# include <linux/sockios.h>
-# ifndef __USE_MISC
-# define __USE_MISC
-# include <sys/fsuid.h>
-# endif /* __USE_MISC */
-#endif
#include <pwd.h>
#include <grp.h>
@@ -522,7 +515,7 @@ pam_iruserok(pam_handle_t *pamh,
*/
/* We are root, this will not fail */
-#ifdef linux
+#ifdef __linux__
/* If we are on linux the better way is setfsuid */
uid = setfsuid(pwd->pw_uid);
hostf = fopen(pbuf, "r");
@@ -598,7 +591,7 @@ exit_function:
* they are reset before we exit.
*/
-#ifdef linux
+#ifdef __linux__
setfsuid(uid);
#else
(void)seteuid(uid);