1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 07_norootpassword.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
--- screen-4.0.3.orig/attacher.c
10
+++ screen-4.0.3/attacher.c
13
pam_handle_t *pamh = 0;
16
- char *pass, mypass[16 + 1], salt[3];
18
+ char *pass, mypass[16 + 1], salt[3];
27
pass = ppp->pw_passwd;
28
if (pass == 0 || *pass == 0)
31
pass = crypt(mypass, salt);
32
pass = ppp->pw_passwd = SaveStr(pass);
38
debug("screen_builtin_lck looking in gcos field\n");
40
AttacherFinit(SIGARG);
46
PAM_conversation.appdata_ptr = cp1;
47
pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh);
49
PAM_conversation.appdata_ptr = 0;
50
if (pam_error == PAM_SUCCESS)
53
- if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
59
+ if (!strncmp(crypt(cp1, pass), pass, strlen(pass)))
62
debug("screen_builtin_lck: NO!!!!!\n");
63
bzero(cp1, strlen(cp1));