summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Ruggeri <druggeri@apache.org>2013-01-15 17:00:44 +0100
committerDaniel Ruggeri <druggeri@apache.org>2013-01-15 17:00:44 +0100
commit023e47cb2f586b1b3a86341c88837e6d7ab45854 (patch)
treee7a40eb0891f5c25ad338eb30c8f8c23478a87ef /include
parentfix mysql connection string in example (diff)
downloadapache2-023e47cb2f586b1b3a86341c88837e6d7ab45854.tar.xz
apache2-023e47cb2f586b1b3a86341c88837e6d7ab45854.zip
Add helper function to execute command w args and get one line of output. Allow AuthLDAPBindPassword to have exec: argument like SSLPassPhraseDialog
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1433478 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/httpd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/httpd.h b/include/httpd.h
index 8f5d4f109b..33b2d07800 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -2291,6 +2291,18 @@ AP_DECLARE(apr_status_t) ap_password_validate(request_rec *r,
const char *passwd,
const char *hash);
+/**
+ * Short function to execute a command and return the first line of
+ * output minus \r \n. Useful for "obscuring" passwords via exec calls
+ * @param p the pool to allocate from
+ * @param cmd the command to execute
+ * @param argv the arguments to pass to the cmd
+ * @return ptr to characters or NULL on any error
+ */
+AP_DECLARE(char *) ap_get_exec_line(apr_pool_t *p,
+ const char *cmd,
+ const char * const *argv);
+
#define AP_NORESTART APR_OS_START_USEERR + 1