View | Details | Raw Unified | Return to bug 91626
Collapse All | Expand All

(-)xlockmore/Makefile (-2 / +2 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	xlockmore
8
PORTNAME=	xlockmore
9
PORTVERSION=	5.20.1
9
PORTVERSION=	5.21
10
PORTREVISION=	1
10
PORTREVISION=	0
11
CATEGORIES?=	x11
11
CATEGORIES?=	x11
12
MASTER_SITES=	ftp://ftp.tux.org/pub/tux/bagleyd/xlockmore/ \
12
MASTER_SITES=	ftp://ftp.tux.org/pub/tux/bagleyd/xlockmore/ \
13
		http://www.tux.org/~bagleyd/latest/
13
		http://www.tux.org/~bagleyd/latest/
(-)xlockmore/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (xlockmore-5.20.1.tar.bz2) = f70b24437d44cfa10ca259d00608deef
1
MD5 (xlockmore-5.21.tar.bz2) = eefe878d7efaa982ee53553c78534315
2
SHA256 (xlockmore-5.20.1.tar.bz2) = 772c1da9a125ca9664e3388af447c1dce35c8b370021c1b07dbb9dffd7ba9e41
2
SHA256 (xlockmore-5.21.tar.bz2) = 1d5978d0577991f4bcff3a569e3b17e328b1588d946a7b4afad3def9cc40bfbd
3
SIZE (xlockmore-5.20.1.tar.bz2) = 1768913
3
SIZE (xlockmore-5.21.tar.bz2) = 1794442
(-)xlockmore/files/patch-pam-passwd.c (-62 lines)
Lines 1-62 Link Here
1
--- ../xlockmore-5.20.1.orig/xlock/passwd.c	Mon Sep 26 17:11:20 2005
2
+++ xlock/passwd.c	Mon Dec 12 15:04:31 2005
3
@@ -304,6 +304,16 @@
4
 	reply = (struct pam_response *) malloc(sizeof (struct pam_response) *
5
 					       num_msg);
6
 
7
+// reply[] members is not initialized!
8
+// As a result - abort trap when PAM tries to free reply structure
9
+// after PAM_ERROR_MSG processing.
10
+
11
+// So I just initialize reply here with default values and drop
12
+// initialization from code below (if code matches).
13
+
14
+	reply[replies].resp_retcode = PAM_SUCCESS; // be optimistic
15
+	reply[replies].resp = NULL;
16
+
17
 	if (!reply)
18
 		return PAM_CONV_ERR;
19
 
20
@@ -325,7 +335,6 @@
21
 			  }
22
 			  else
23
 			  {
24
-			    reply[replies].resp_retcode = PAM_SUCCESS;
25
 			    reply[replies].resp = COPY_STRING(PAM_password);
26
 			  }
27
 #ifdef DEBUG
28
@@ -340,11 +349,6 @@
29
 			  {
30
 			    PAM_putText( msg[replies], &reply[replies], False );
31
 			  }
32
-			  else
33
-			  {
34
-			    reply[replies].resp_retcode = PAM_SUCCESS;
35
-			    reply[replies].resp = NULL;
36
-			  }
37
 #ifdef DEBUG
38
 			        (void) printf( "Back From PAM_putText: PAM_PROMPT_ECHO_ON\n" );
39
 			        (void) printf( "Response is: (%s)\n, Return Code is: (%d)\n",
40
@@ -357,11 +361,7 @@
41
 			  {
42
 			    PAM_putText( msg[replies], &reply[replies], False );
43
 			  }
44
-			  else
45
-			  {
46
-			    reply[replies].resp_retcode = PAM_SUCCESS;
47
-			    reply[replies].resp = NULL;
48
-			  }
49
+				/* PAM frees resp */
50
 #ifdef DEBUG
51
 			        (void) printf( "Back From PAM_putText: PAM_PROMPT_ECHO_ON\n" );
52
 			        (void) printf( "Response is: (%s)\n, Return Code is: (%d)\n",
53
@@ -1205,8 +1205,7 @@
54
 	pam_error = pam_authenticate(pamh, 0);
55
 	if (pam_error != PAM_SUCCESS) {
56
                 if (!allowroot) {
57
-                        pam_end(pamh, 0);
58
-                        return False;
59
+					PAM_BAIL;
60
                 }
61
 
62
 		/* Try as root; bail if no success there either */
(-)xlockmore/files/patch-pam-xlock.c (-17 lines)
Lines 1-17 Link Here
1
--- ../xlockmore-5.20.1.orig/xlock/xlock.c	Thu Oct 27 04:09:29 2005
2
+++ xlock/xlock.c	Mon Dec 12 14:56:05 2005
3
@@ -3316,7 +3316,14 @@
4
 #ifdef USE_VTLOCK
5
 	if (!vtlock)
6
 #endif
7
+#ifdef BAD_PAM
8
+		(void) seteuid(ruid);
9
+#else
10
 		(void) setuid(ruid);
11
+#endif
12
+// #ifdef BAD_PAM ... #endif above will be added to prevent xlock from
13
+// dropping privileges when using PAM modules, that needs root rights
14
+// (pam_unix e.g.)
15
 
16
 #if 0
17
 	/* synchronize -- so I am aware of errors immediately */

Return to bug 91626