aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/piesctl-cl.opt6
-rw-r--r--src/piesctl.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/piesctl-cl.opt b/src/piesctl-cl.opt
index f7eaf2a..ebdfec4 100644
--- a/src/piesctl-cl.opt
+++ b/src/piesctl-cl.opt
@@ -69,6 +69,12 @@ BEGIN
}
END
+OPTION(no-netrc,N,,
+ [<don't read ~/.netrc file>])
+BEGIN
+ no_netrc_option = 1;
+END
+
GROUP(Preprocessor)
OPTION(include-directory,I,DIR,
diff --git a/src/piesctl.c b/src/piesctl.c
index 0cd2736..4c777d7 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -49,6 +49,7 @@ char const *instance = "pies";
char *config_file;
char default_config_file[] = SYSCONFDIR "/piesctl.conf";
int preprocess_only;
+int no_netrc_option;
int verbose;
int dump;
@@ -543,7 +544,8 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr)
if (pies_url_copy (&conn->url, url))
grecs_alloc_die ();
- netrc_scan (conn->url);
+ if (!no_netrc_option)
+ netrc_scan (conn->url);
return conn;
}

Return to:

Send suggestions and report system problems to the System administrator.