char *hdir = getenv ("HOME");
credentials_file = concat (hdir ? hdir : ".", "/.netrc", NULL);
- } else if (! strncasecmp (cred_style, "file:", 5)) {
+ } else if (! strncasecmp (cred_style, "file:", 5) ||
+ ! strncasecmp (cred_style, "file-nopermcheck:", 17)) {
struct stat st;
- char *filename = cred_style + 5;
+ char *filename = strchr(cred_style, ':') + 1;
while (*filename && isspace ((unsigned char) *filename)) ++filename;
}
}
}
+
+ if (! strncasecmp (cred_style, "file-nopermcheck:", 17))
+ credentials_no_perm_check = 1;
}
}
}
creds->host = host;
if (cred_style == NULL || ! strcmp (cred_style, "legacy")) {
+ creds->user = user == NULL ? getusername () : user;
if (sasl) {
+
/* This is what inc.c and msgchk.c used to contain. */
/* Only inc.c and msgchk.c do this. smtp.c doesn't. */
- creds->user = user == NULL ? getusername () : user;
creds->password = getusername ();
}
- } else if (! strncasecmp (cred_style, "file:", 5)) {
+ } else if (! strncasecmp (cred_style, "file:", 5) ||
+ ! strncasecmp (cred_style, "file-nopermcheck:", 17)) {
/*
* Determine user using the first of:
* 1) -user switch