summaryrefslogtreecommitdiff
path: root/debian/patches-applied/hurd_no_setfsuid
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-applied/hurd_no_setfsuid')
-rw-r--r--debian/patches-applied/hurd_no_setfsuid24
1 files changed, 15 insertions, 9 deletions
diff --git a/debian/patches-applied/hurd_no_setfsuid b/debian/patches-applied/hurd_no_setfsuid
index 76501432..24ce40a0 100644
--- a/debian/patches-applied/hurd_no_setfsuid
+++ b/debian/patches-applied/hurd_no_setfsuid
@@ -4,10 +4,10 @@ Authors: Steve Langasek <vorlon@debian.org>
Upstream status: superseded by pam_modutil_set_euid proposal
-Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
+Index: pam.deb/modules/pam_xauth/pam_xauth.c
===================================================================
---- Linux-PAM/modules/pam_xauth/pam_xauth.c.orig
-+++ Linux-PAM/modules/pam_xauth/pam_xauth.c
+--- pam.deb.orig/modules/pam_xauth/pam_xauth.c
++++ pam.deb/modules/pam_xauth/pam_xauth.c
@@ -35,7 +35,9 @@
#include "config.h"
@@ -18,7 +18,7 @@ Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
#include <sys/wait.h>
#include <errno.h>
#include <fnmatch.h>
-@@ -210,6 +212,9 @@
+@@ -218,6 +220,9 @@
FILE *fp;
int i;
uid_t euid;
@@ -28,7 +28,7 @@ Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
/* Check this user's <sense> file. */
pwd = pam_modutil_getpwnam(pamh, this_user);
if (pwd == NULL) {
-@@ -226,9 +231,34 @@
+@@ -234,9 +239,34 @@
return PAM_SESSION_ERR;
}
euid = geteuid();
@@ -63,7 +63,7 @@ Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
if (fp != NULL) {
char buf[LINE_MAX], *tmp;
/* Scan the file for a list of specs of users to "trust". */
-@@ -297,6 +327,9 @@
+@@ -306,6 +336,9 @@
int fd, i, debug = 0;
int retval = PAM_SUCCESS;
uid_t systemuser = 499, targetuser = 0, euid;
@@ -73,7 +73,7 @@ Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
/* Parse arguments. We don't understand many, so no sense in breaking
* this into a separate function. */
-@@ -541,9 +574,34 @@
+@@ -554,7 +587,22 @@
/* Generate a new file to hold the data. */
euid = geteuid();
@@ -93,7 +93,13 @@ Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
+ }
+ }
+#endif
- fd = mkstemp(xauthority + strlen(XAUTHENV) + 1);
+
+ #ifdef WITH_SELINUX
+ if (is_selinux_enabled() > 0) {
+@@ -584,7 +632,17 @@
+ save_errno = errno;
+ #endif
+
+#ifdef HAVE_SYS_FSUID_H
setfsuid(euid);
+#else
@@ -106,5 +112,5 @@ Index: Linux-PAM/modules/pam_xauth/pam_xauth.c
+ }
+#endif
if (fd == -1) {
+ errno = save_errno;
pam_syslog(pamh, LOG_ERR,
- "error creating temporary file `%s': %m",