Index: pw_util.c =================================================================== --- pw_util.c (révision 241912) +++ pw_util.c (copie de travail) @@ -96,6 +96,7 @@ #if 0 struct rlimit rlim; #endif + struct stat st; if (dir == NULL) { strcpy(passwd_dir, _PATH_ETC); @@ -123,6 +124,14 @@ strcpy(masterpasswd, master); } + if (stat(masterpasswd, &st) == -1) + return (-1); + + if (S_ISDIR(st.st_mode)) { + errno = EISDIR; + return (-1); + } + /* * The code that follows is extremely disruptive to the calling * process, and is therefore disabled until someone can conceive