Skip to content

Commit 4b8a3b6

Browse files
committed
sapi: Remove sapi_get_target_[ug]id
These were introduced in 294e776. These are not used anywhere.
1 parent 4a37012 commit 4b8a3b6

3 files changed

Lines changed: 2 additions & 26 deletions

File tree

‎UPGRADING.INTERNALS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ PHP 8.7 INTERNALS UPGRADE NOTES
2020
- The sapi_terminate_process() function was removed.
2121
- The sapi_force_http_10() function was removed.
2222
- The sapi_get_fd() function was removed.
23+
- The sapi_get_target_uid() and sapi_get_target_gid() functions were removed.
2324

2425
========================
2526
2. Build system changes
@@ -48,3 +49,4 @@ PHP 8.7 INTERNALS UPGRADE NOTES
4849
. The terminate_process method has been removed.
4950
. The force_http_10 method has been removed.
5051
. The get_fd method has been removed.
52+
. The get_target_uid and get_target_gid methods have been removed.

‎main/SAPI.c‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,25 +1036,6 @@ SAPI_API char *sapi_getenv(const char *name, size_t name_len)
10361036
return value;
10371037
}
10381038

1039-
1040-
SAPI_API int sapi_get_target_uid(uid_t *obj)
1041-
{
1042-
if (sapi_module.get_target_uid) {
1043-
return sapi_module.get_target_uid(obj);
1044-
} else {
1045-
return FAILURE;
1046-
}
1047-
}
1048-
1049-
SAPI_API int sapi_get_target_gid(gid_t *obj)
1050-
{
1051-
if (sapi_module.get_target_gid) {
1052-
return sapi_module.get_target_gid(obj);
1053-
} else {
1054-
return FAILURE;
1055-
}
1056-
}
1057-
10581039
SAPI_API double sapi_get_request_time(void)
10591040
{
10601041
if(SG(global_request_time)) return SG(global_request_time);

‎main/SAPI.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_h
224224
SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len);
225225
SAPI_API void sapi_activate_headers_only(void);
226226

227-
SAPI_API int sapi_get_target_uid(uid_t *);
228-
SAPI_API int sapi_get_target_gid(gid_t *);
229227
SAPI_API double sapi_get_request_time(void);
230228
END_EXTERN_C()
231229

@@ -266,9 +264,6 @@ struct _sapi_module_struct {
266264
int php_ini_ignore;
267265
int php_ini_ignore_cwd; /* don't look for php.ini in the current directory */
268266

269-
int (*get_target_uid)(uid_t *);
270-
int (*get_target_gid)(gid_t *);
271-
272267
unsigned int (*input_filter)(int arg, const char *var, char **val, size_t val_len, size_t *new_val_len);
273268

274269
void (*ini_defaults)(HashTable *configuration_hash);
@@ -320,8 +315,6 @@ END_EXTERN_C()
320315
NULL, /* executable_location */ \
321316
0, /* php_ini_ignore */ \
322317
0, /* php_ini_ignore_cwd */ \
323-
NULL, /* get_target_uid */ \
324-
NULL, /* get_target_gid */ \
325318
NULL, /* input_filter */ \
326319
NULL, /* ini_defaults */ \
327320
0, /* phpinfo_as_text; */ \

0 commit comments

Comments
 (0)