projects
/
ckermit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
96a2601
)
first attempt at fix for pam problem
author
Ian Beckwith
<ianb@nessie.mcc.ac.uk>
Tue, 25 Sep 2007 15:41:24 +0000
(16:41 +0100)
committer
Ian Beckwith
<ianb@nessie.mcc.ac.uk>
Tue, 25 Sep 2007 15:41:24 +0000
(16:41 +0100)
ckufio.c
patch
|
blob
|
history
ckuus7.c
patch
|
blob
|
history
diff --git
a/ckufio.c
b/ckufio.c
index
298c48e
..
4648104
100644
(file)
--- a/
ckufio.c
+++ b/
ckufio.c
@@
-490,6
+490,9
@@
extern char * anonroot;
static char guestpass[GUESTPASS] = { NUL, NUL }; /* Anonymous "password" */
static int logged_in = 0; /* Set when user is logged in */
static int askpasswd = 0; /* Have OK user, must ask for passwd */
static char guestpass[GUESTPASS] = { NUL, NUL }; /* Anonymous "password" */
static int logged_in = 0; /* Set when user is logged in */
static int askpasswd = 0; /* Have OK user, must ask for passwd */
+#ifdef CK_PAM
+extern int gotemptypasswd;
+#endif /* CK_PAM */
#endif /* CK_LOGIN */
#ifdef CKROOT
#endif /* CK_LOGIN */
#ifdef CKROOT
@@
-8043,8
+8046,12
@@
zvpass(p) char *p; {
}
}
debug(F110,"zvpass","calling pam_authenticate",0);
}
}
debug(F110,"zvpass","calling pam_authenticate",0);
- if (*p)
- pam_pw = p;
+ if (*p
+#ifdef CK_LOGIN
+ || gotemptypasswd
+#endif /* CK_LOGIN */
+ )
+ pam_pw = p;
if ((pam_status = pam_authenticate(pamh, 0)) != PAM_SUCCESS) {
reply = pam_strerror(pamh, pam_status);
debug(F110,"zvpass PAM failure",reply,0);
if ((pam_status = pam_authenticate(pamh, 0)) != PAM_SUCCESS) {
reply = pam_strerror(pamh, pam_status);
debug(F110,"zvpass PAM failure",reply,0);
diff --git
a/ckuus7.c
b/ckuus7.c
index
4268ef1
..
5a73d12
100644
(file)
--- a/
ckuus7.c
+++ b/
ckuus7.c
@@
-98,6
+98,12
@@
extern int g_matchdot, hints, xcmdsrc, rcdactive;
extern char * k_info_dir;
extern char * k_info_dir;
+#ifdef CK_LOGIN
+#ifdef CK_PAM
+int gotemptypasswd = 0; /* distinguish empty passwd from none given */
+#endif /* CK_PAM */
+#endif /* CK_LOGIN */
+
#ifndef NOSPL
extern int nmac;
extern struct mtab *mactab;
#ifndef NOSPL
extern int nmac;
extern struct mtab *mactab;
@@
-14656,9
+14662,9
@@
ckxlogin(userid, passwd, acct, promptok)
#ifdef CK_RECALL
extern int on_recall; /* around Password prompting */
#endif /* CK_RECALL */
#ifdef CK_RECALL
extern int on_recall; /* around Password prompting */
#endif /* CK_RECALL */
-#ifdef C
K_PAM
+#ifdef C
OMMENT
extern int guest;
extern int guest;
-#endif /* C
K_PAM
*/
+#endif /* C
OMMENT
*/
int rprompt = 0; /* Restore prompt */
#ifdef CKSYSLOG
int savlog;
int rprompt = 0; /* Restore prompt */
#ifdef CKSYSLOG
int savlog;
@@
-14774,9
+14780,9
@@
ckxlogin(userid, passwd, acct, promptok)
debug(F111,"ckxlogin zvuser",userid,ok);
if (!*passwd && promptok
debug(F111,"ckxlogin zvuser",userid,ok);
if (!*passwd && promptok
-#ifdef C
K_PAM
+#ifdef C
OMMENT
&& guest
&& guest
-#endif /* C
K_PAM
*/
+#endif /* C
OMMENT
*/
) {
char prmpt[80];
) {
char prmpt[80];
@@
-14852,6
+14858,9
@@
ckxlogin(userid, passwd, acct, promptok)
if (pflag) prompt(xxstring); /* Issue prompt if at top level */
cmres(); /* Reset the parser */
for (x = -1; x < 0;) { /* Prompt till they answer */
if (pflag) prompt(xxstring); /* Issue prompt if at top level */
cmres(); /* Reset the parser */
for (x = -1; x < 0;) { /* Prompt till they answer */
+#ifdef CK_PAM
+ gotemptypasswd=0;
+#endif /* CK_PAM */
x = cmtxt("","",&s,NULL); /* Get a literal line of text */
if (x == -4 || x == -10) {
printf("\r\n%sLogin cancelled\n",
x = cmtxt("","",&s,NULL); /* Get a literal line of text */
if (x == -4 || x == -10) {
printf("\r\n%sLogin cancelled\n",
@@
-14861,6
+14870,10
@@
ckxlogin(userid, passwd, acct, promptok)
#endif /* CKSYSLOG */
doexit(GOOD_EXIT,0);
}
#endif /* CKSYSLOG */
doexit(GOOD_EXIT,0);
}
+#ifdef CK_PAM
+ if(!*s)
+ gotemptypasswd=1;
+#endif /* CK_PAM */
if (sstate) /* In case of a Kermit packet */
goto XCKXLOG;
cmres(); /* Reset the parser again */
if (sstate) /* In case of a Kermit packet */
goto XCKXLOG;
cmres(); /* Reset the parser again */