|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
diff -up Linux-PAM-0.99.8.1/modules/pam_unix/passverify.h.unix-hpux-aging Linux-PAM-0.99.8.1/modules/pam_unix/passverify.h
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
--- Linux-PAM-0.99.8.1/modules/pam_unix/passverify.h.unix-hpux-aging 2008-01-08 14:43:36.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+++ Linux-PAM-0.99.8.1/modules/pam_unix/passverify.h 2008-01-08 15:49:43.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
@@ -13,7 +13,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
#define OLD_PASSWORDS_FILE "/etc/security/opasswd"
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
int
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
-verify_pwd_hash(const char *p, const char *hash, unsigned int nullok);
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+verify_pwd_hash(const char *p, char *hash, unsigned int nullok);
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
int
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
is_pwd_shadowed(const struct passwd *pwd);
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
diff -up Linux-PAM-0.99.8.1/modules/pam_unix/passverify.c.unix-hpux-aging Linux-PAM-0.99.8.1/modules/pam_unix/passverify.c
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
--- Linux-PAM-0.99.8.1/modules/pam_unix/passverify.c.unix-hpux-aging 2008-01-08 14:43:36.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+++ Linux-PAM-0.99.8.1/modules/pam_unix/passverify.c 2008-01-08 15:49:02.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
@@ -44,14 +44,32 @@
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
# include "./lckpwdf.-c"
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
#endif
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+static void
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+strip_hpux_aging(char *p)
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+{
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ const char *valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ "abcdefghijklmnopqrstuvwxyz"
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ "0123456789./";
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ if ((*p != '$') && (strlen(p) > 13)) {
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ for (p += 13; *p != '\0'; p++) {
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ if (strchr(valid, *p) == NULL) {
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ *p = '\0';
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ break;
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+}
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
int
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
-verify_pwd_hash(const char *p, const char *hash, unsigned int nullok)
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
{
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
- size_t hash_len = strlen(hash);
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ size_t hash_len;
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
char *pp = NULL;
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
int retval;
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
D(("called"));
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ strip_hpux_aging(hash);
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
+ hash_len = strlen(hash);
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
if (!hash_len) {
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
/* the stored password is NULL */
|
|
![](https://seccdn.libravatar.org/avatar/dedd662cd18533e6b346ba9fced85f9b3e4c6ff8041e69506ad783477abed011?s=16&d=retro) |
bd5492a |
if (nullok) { /* this means we've succeeded */
|