passwd: rework:
* do not make backup copy by copying (just retain old file) * correctly fall back to /etc/passwd if user is not in shadow * fix bug with overlong passwd entries * be permissive on some kinds of failures * reduce stack usage * code size: -500 bytes
This commit is contained in:
@@ -117,12 +117,14 @@ int patch_main(int argc, char **argv)
|
||||
free(patch_line);
|
||||
patch_line = xmalloc_fgets(patch_file);
|
||||
}
|
||||
/* FIXME: patch_line NULL check?? */
|
||||
|
||||
/* Extract the filename used before the patch was generated */
|
||||
original_filename = extract_filename(patch_line, patch_level);
|
||||
free(patch_line);
|
||||
|
||||
patch_line = xmalloc_fgets(patch_file);
|
||||
/* FIXME: NULL check?? */
|
||||
if (strncmp(patch_line, "+++ ", 4) != 0) {
|
||||
ret = 2;
|
||||
bb_error_msg("invalid patch");
|
||||
|
Reference in New Issue
Block a user