inc: -noaudit -norpop -noapop -host cuckoo
- Add the following to ~/.netrc and ensure it is readable only by you
- (e.g., chmod 600 .netrc):
+ Add the following to ~/.netrc and ensure it [grants no permissions to
+ group or other] (e.g., chmod 600 .netrc):
machine cuckoo.domain.name login joeuser password secret
(stb.st_mode & 077) != 0) {
/* We make this a fatal error to force the
user to correct it. */
- advise(NULL, "Error - file %s must not be world or "
- "group readable.", credentials_file);
+ advise(NULL, "group or other permissions, %#o, "
+ "forbidden: %s", stb.st_mode, credentials_file);
adios(NULL, "Remove password or correct file "
"permissions.");
}
Dude, nmh is totally brutal.
EOM
+# Check netrc's permissions test
+pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" '' '' "$testmessage"`
+chmod g=w,o=x $netrc
+run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport" \
+ "inc: group or other permissions, 0100621, forbidden: $netrc
+inc: Remove password or correct file permissions."
+chmod go= $netrc
+
pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" \
"$TESTUSER" "$TESTPASS" "$testmessage"`