1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 10norootpassword.dpatch by Martin Pitt <martin.pitt@ubuntu.com>
4
## DP: When locking a root-owned screen, check that root has a
5
## DP: password set. If not, ask for an unlocking key.
6
## DP: See https://bugs.launchpad.net/bugs/6760
9
diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c
10
--- screen-4.0.3.orig/attacher.c 2008-06-01 23:39:48.000000000 +0200
11
+++ screen-4.0.3/attacher.c 2008-06-01 23:40:21.000000000 +0200
14
pam_handle_t *pamh = 0;
17
- char *pass, mypass[16 + 1], salt[3];
19
+ char *pass, mypass[16 + 1], salt[3];
28
pass = ppp->pw_passwd;
29
if (pass == 0 || *pass == 0)
32
pass = crypt(mypass, salt);
33
pass = ppp->pw_passwd = SaveStr(pass);
39
debug("screen_builtin_lck looking in gcos field\n");
41
AttacherFinit(SIGARG);
47
PAM_conversation.appdata_ptr = cp1;
48
pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh);
50
PAM_conversation.appdata_ptr = 0;
51
if (pam_error == PAM_SUCCESS)
54
- if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
60
+ if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
63
debug("screen_builtin_lck: NO!!!!!\n");
64
bzero(cp1, strlen(cp1));