char state_password=0; /* Found a password keyword */
char state_our_login=0; /* With specific_login, found *our* login name */
+#define NETRC DOT_CHAR "netrc"
+
#ifdef CURLDEBUG
{
/* This is a hack to allow testing.
char *override = curl_getenv("CURL_DEBUG_NETRC");
if (override) {
- printf("NETRC: overridden .netrc file: %s\n", home);
+ printf("NETRC: overridden " NETRC " file: %s\n", home);
netrcfile = override;
netrc_alloc = TRUE;
}
}
#endif /* CURLDEBUG */
if(!netrcfile) {
-#define NETRC DOT_CHAR "netrc"
#if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
struct passwd *pw;
pw= getpwuid(geteuid());
}
#endif
- if(NULL == pw) {
+ if(!home) {
home = curl_getenv("HOME"); /* portable environment reader */
if(!home)
return -1;