mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Revert "Centralized function compatible with Linux & Windows (also with mpm-itk & mod_ruid2) to get username"
This reverts commit c7b28f0e13fa18d8503877e026744f76607cfbae.
This commit is contained in:
parent
c7b28f0e13
commit
b3b33c9ff1
@ -2843,14 +2843,3 @@ char* strtok_r(
|
||||
}
|
||||
#endif
|
||||
|
||||
// Function compatible with Linux & Windows, also with mpm-itk & mod_ruid2
|
||||
char* get_username(apr_pool_t* mp) {
|
||||
char* username;
|
||||
apr_uid_t uid;
|
||||
apr_gid_t gid;
|
||||
int rc = apr_uid_current(&uid, &gid, mp);
|
||||
if (rc != APR_SUCCESS) return "apache";
|
||||
rc = apr_uid_name_get(&username, uid, mp);
|
||||
if (rc != APR_SUCCESS) return "apache";
|
||||
return username;
|
||||
}
|
||||
|
@ -159,8 +159,6 @@ int DSOLOCAL tree_contains_ip(apr_pool_t *mp, TreeRoot *rtree,
|
||||
int DSOLOCAL ip_tree_from_param(apr_pool_t *pool,
|
||||
char *param, TreeRoot **rtree, char **error_msg);
|
||||
|
||||
char DSOLOCAL *get_username(apr_pool_t* mp);
|
||||
|
||||
#ifdef WITH_CURL
|
||||
int ip_tree_from_uri(TreeRoot **rtree, char *uri,
|
||||
apr_pool_t *mp, char **error_msg);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user