]> granicus.if.org Git - apache/blobdiff - include/httpd.h
Add helper function to execute command w args and get one line of output. Allow AuthL...
[apache] / include / httpd.h
index 8f5d4f109b4bce103177b1f24ac5d8cd38333112..33b2d07800aa0d17c59ba2e6fc9e3d6650885860 100644 (file)
@@ -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