diff -urp bleeding-jumbo-opt5/src/loader.c bleeding-jumbo-opt/src/loader.c --- bleeding-jumbo-opt5/src/loader.c 2015-09-16 03:02:41 +0000 +++ bleeding-jumbo-opt/src/loader.c 2015-09-16 04:05:45 +0000 @@ -238,7 +238,7 @@ static char *ldr_get_field(char **ptr, c return res; } -static int ldr_check_list(struct list_main *list, char *s1, char *s2) +static MAYBE_INLINE int ldr_check_list(struct list_main *list, char *s1, char *s2) { struct list_entry *current; char *data; @@ -262,7 +262,7 @@ static int ldr_check_list(struct list_ma return 0; } -static int ldr_check_shells(struct list_main *list, char *shell) +static MAYBE_INLINE int ldr_check_shells(struct list_main *list, char *shell) { char *name; @@ -340,6 +340,8 @@ static int ldr_split_line(char **login, fields[0] = *login = ldr_get_field(&line, db_opts->field_sep_char); fields[1] = *ciphertext = ldr_get_field(&line, db_opts->field_sep_char); + goto bare_hash; + /* Check for NIS stuff */ if ((!strcmp(*login, "+") || !strncmp(*login, "+@", 2)) && strlen(*ciphertext) < 10 && strncmp(*ciphertext, "$dummy$", 7) @@ -356,6 +358,8 @@ static int ldr_split_line(char **login, } if (!**ciphertext && !line) { +bare_hash: + ; /* Possible hash on a line on its own (no colons) */ char *p = *login; /* Skip leading and trailing whitespace */ @@ -364,6 +368,7 @@ static int ldr_split_line(char **login, p += strlen(p) - 1; while (p > *ciphertext && (*p == ' ' || *p == '\t')) p--; p++; +#if 0 /* Some valid dummy or plaintext hashes may be shorter than 10 characters, * so don't subject them to the length checks. */ if (strncmp(*ciphertext, "$dummy$", 7) && @@ -388,6 +393,7 @@ static int ldr_split_line(char **login, return 0; } } +#endif *p = 0; fields[0] = *login = no_username; fields[1] = *ciphertext; @@ -426,6 +432,8 @@ static int ldr_split_line(char **login, *home = fields[5]; shell = fields[6]; + goto find_format; + if (SPLFLEN(2) == 32 || SPLFLEN(3) == 32) { /* PWDUMP */ /* user:uid:LMhash:NThash:comment:homedir: */ @@ -594,7 +602,7 @@ static int ldr_split_line(char **login, #undef check_field_separator } - +find_format: if (*format) { char *prepared; int valid; @@ -607,6 +615,7 @@ static int ldr_split_line(char **login, if (valid) { *ciphertext = prepared; + return valid; #ifdef HAVE_FUZZ if (options.flags & FLG_FUZZ_CHK) { ldr_set_encoding(*format);