History log of /PHP-8.3/ext/posix/posix.c (Results 1 – 25 of 219)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# c12fd087 16-Apr-2024 Arnaud Le Blanc

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
[ci skip] NEWS
fix: zend-max-execution-timers with negative or high timeout value (#13942)
Use return value of getpwuid_r(),

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
[ci skip] NEWS
fix: zend-max-execution-timers with negative or high timeout value (#13942)
Use return value of getpwuid_r(), not errno (#13969)

show more ...


# 32efc76c 16-Apr-2024 Arnaud Le Blanc

Use return value of getpwuid_r(), not errno (#13969)

# d986b5c6 11-Apr-2024 Arnaud Le Blanc

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
[ci skip] NEWS
Fix usage of reentrant functions in ext/posix (#13921)


# 66809c05 11-Apr-2024 Arnaud Le Blanc

Fix usage of reentrant functions in ext/posix (#13921)

- It's not necessarily an error of sysconf(_SC_GETPW_R_SIZE_MAX) returns -1, as
specified by posix (and the musl implementation a

Fix usage of reentrant functions in ext/posix (#13921)

- It's not necessarily an error of sysconf(_SC_GETPW_R_SIZE_MAX) returns -1, as
specified by posix (and the musl implementation always returns -1). Pick an
initial buffer size in this case.
- Reentrant variants return an error number an may not set errno
- Implement retry logic for ttyname_r()
- Fix retry logic for getpwnam_r() (pw would be NULL after the first try)
- Test retry logic by setting the initial buffer size to 1 in debug builds

show more ...

# ff2b5088 19-Nov-2023 Peter Kokot

Refactor checks for fpathconf and pathconf

These two might not be available everywhere so we check them in
config.m4 when doing the configure step. Check is skipped for musl libc
due

Refactor checks for fpathconf and pathconf

These two might not be available everywhere so we check them in
config.m4 when doing the configure step. Check is skipped for musl libc
due to limited implementation.

Constants that are defined into main/php_config.h:
HAVE_FPATHCONF
HAVE_PATHCONF

Implemented via GH-10238
Related to GH-10350
Fixes GH-12725

show more ...

# 66e2aa72 13-Jul-2023 Ilija Tovilo

Fix use-of-uninitialized-value when calling php_posix_stream_get_fd (#11694)

Passing a double pointer to php_stream_cast means the caller of
php_posix_stream_get_fd will never receive th

Fix use-of-uninitialized-value when calling php_posix_stream_get_fd (#11694)

Passing a double pointer to php_stream_cast means the caller of
php_posix_stream_get_fd will never receive the actual value. Moreover,
php_posix_stream_get_fd may only write the low sizeof(php_socket_t) bytes of fd,
so we need to initialize the upper bytes to 0 to avoid partial
use-of-uninitialized-value.

show more ...

# 59f6d08f 11-Jul-2023 George Peter Banyard

ext/posix: posix_isatty() fix use-of-uninitialized-value (#11676)

When the value passed is not representable as an int then it is not a TTY and thus should return false immediately.

ext/posix: posix_isatty() fix use-of-uninitialized-value (#11676)

When the value passed is not representable as an int then it is not a TTY and thus should return false immediately.

This was reported by MSAN.

show more ...

# 39ef5ca3 10-Jul-2023 George Peter Banyard

Add tests for uncastable streams and dataloss streams (#10173)

And suppress the nonsensical warnings by passing the PHP_STREAM_CAST_INTERNAL flag.

# 717f460f 29-Mar-2023 David CARLIER

ext/posix: posix_eaccess little update and forgotten UPGRADING entry. (#10965)

# 2b354318 23-Mar-2023 David CARLIER

ext/posix: proposing posix_eaccess. unlike access, it is not standard but available in enough platforms ; on linux it's euidaccess in reality eaccess being 'just' an alias. key difference is eaccess

ext/posix: proposing posix_eaccess. unlike access, it is not standard but available in enough platforms ; on linux it's euidaccess in reality eaccess being 'just' an alias. key difference is eaccess checks the effective user id instead.

Close GH-10917

show more ...

# ab3f8718 13-Feb-2023 Cristian Rodríguez

posix: fix misuse of bool (invalid code in c23)

a bool pointer argument cannot take true or false but either &boolval
or NULL

Closes GH-10577.

# dee39518 16-Jan-2023 David Carlier

posix detects posix_pathconf api.

alpine linux throws undefined reference at build time, thus
not assuming it s necessarily available.

Closes GH-10350.

# 7936c808 23-Jan-2023 Máté Kocsis

Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385)

# 55d19eee 07-Jan-2023 David Carlier

posix adding posix_fpathconf.

follow-up on GH-10238 but with the file descriptor flavor.

Close GH-10253

# 61cf7d49 07-Jan-2023 David Carlier

posix_pathconf throwing ValueError on empty path

# 84af629e 06-Jan-2023 David CARLIER

follow-up on GH-10238. (#10243)

fixes based on feedback.

# 69d49e4d 05-Jan-2023 David Carlier

posix adding posix_pathconf.

to get configuration variables from a directory/file.
Closes GH-10238.

# 31e7d6ef 30-Dec-2022 George Peter Banyard

Check that int file descriptor is valid for posix_(isatty|ttyname)

# 54767b10 28-Dec-2022 George Peter Banyard

Manually handle int ZPP for posix_isatty()/posix_ttyname()

# 11f60223 30-Dec-2022 George Peter Banyard

Merge branch 'PHP-8.2'

* PHP-8.2:
Fix GH-10187: Segfault in stripslashes() with arm64
Fix memory leak in posix_ttyname()


# e6c9b176 30-Dec-2022 George Peter Banyard

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix GH-10187: Segfault in stripslashes() with arm64
Fix memory leak in posix_ttyname()


# c2b0be55 30-Dec-2022 George Peter Banyard

Fix memory leak in posix_ttyname()

Closes GH-10190

# d10a04b3 20-Oct-2022 Ilija Tovilo

Allow specifying resource in posix_getrlimit() for single result

Closes GH-9790

# a5a8b5ff 04-Sep-2022 David Carlier

posix add sysconf call.

providing handful of common and most used constants.

Closes GH-9481.

Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22
# 17f3631d 22-Jul-2022 Máté Kocsis

Declare ext/posix constants in stubs (#9095)

123456789