Skip to content

Commit b3b33c9

Browse files
author
Marc Stern
committed
Revert "Centralized function compatible with Linux & Windows (also with mpm-itk & mod_ruid2) to get username"
This reverts commit c7b28f0.
1 parent c7b28f0 commit b3b33c9

File tree

3 files changed

+841
-821
lines changed

3 files changed

+841
-821
lines changed

apache2/msc_util.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2843,14 +2843,3 @@ char* strtok_r(
28432843
}
28442844
#endif
28452845

2846-
// Function compatible with Linux & Windows, also with mpm-itk & mod_ruid2
2847-
char* get_username(apr_pool_t* mp) {
2848-
char* username;
2849-
apr_uid_t uid;
2850-
apr_gid_t gid;
2851-
int rc = apr_uid_current(&uid, &gid, mp);
2852-
if (rc != APR_SUCCESS) return "apache";
2853-
rc = apr_uid_name_get(&username, uid, mp);
2854-
if (rc != APR_SUCCESS) return "apache";
2855-
return username;
2856-
}

apache2/msc_util.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ int DSOLOCAL tree_contains_ip(apr_pool_t *mp, TreeRoot *rtree,
159159
int DSOLOCAL ip_tree_from_param(apr_pool_t *pool,
160160
char *param, TreeRoot **rtree, char **error_msg);
161161

162-
char DSOLOCAL *get_username(apr_pool_t* mp);
163-
164162
#ifdef WITH_CURL
165163
int ip_tree_from_uri(TreeRoot **rtree, char *uri,
166164
apr_pool_t *mp, char **error_msg);

0 commit comments

Comments
 (0)