Revision tags: 1.32.0-1, 1.32.0 |
|
#
2645:c71a1acff7e9 |
| 06-Nov-2023 |
Andrew Clayton |
Add nxt_file_chown()
This wraps chown(2) but takes the user/owner and group as strings.
It's a little long winded as it uses the thread safe versions of getpwnam()/getgrname() which require a littl
Add nxt_file_chown()
This wraps chown(2) but takes the user/owner and group as strings.
It's a little long winded as it uses the thread safe versions of getpwnam()/getgrname() which require a little more work.
This function will be used by the following commit that allows to set the permissions of the Unix domain control socket.
We need to cast uid & gid to long in the call to nxt_thread_log_alert() to appease clang-ast as it's adamant that uid/gid are unsigned ints, but chown(2) takes -1 for these values to indicate don't change this item, and it'd be nice to show them in the error message.
Note that getpwnam()/getgrname() don't define "not found" as an error as per their man page
The formulation given above under "RETURN VALUE" is from POSIX.1-2001. It does not call "not found" an error, and hence does not specify what value errno might have in this situation. But that makes it impossible to recognize errors. One might argue that according to POSIX errno should be left unchanged if an entry is not found. Experiments on var‐ ious UNIX-like systems show that lots of different values occur in this situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.
Thus if we log an error from these functions we can end up with the slightly humorous error message
2024/02/12 15:15:12 [alert] 99404#99404 getpwnam_r("noddy", ...) failed (0: Success) (User not found) while creating listening socket on unix:/opt/unit/control.unit.sock
Reviewed-by: Zhidao Hong <z.hong@f5.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
Revision tags: 1.31.1-1, 1.31.1, 1.31.0-1, 1.31.0, 1.30.0-1, 1.30.0 |
|
#
2425:a94d0c252c09 |
| 30-Mar-2023 |
Andrew Clayton |
Add nxt_file_stdout().
This is analogous to the nxt_file_stderr() function and will be used in a subsequent commit.
This function redirects stdout to a given file descriptor.
Reviewed-by: Alejandr
Add nxt_file_stdout().
This is analogous to the nxt_file_stderr() function and will be used in a subsequent commit.
This function redirects stdout to a given file descriptor.
Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
Revision tags: 1.29.1-1, 1.29.1, 1.29.0-1, 1.29.0 |
|
#
2258:6ec8b42a8185 |
| 01-Dec-2022 |
Andrew Clayton |
Added simple wrappers for fopen(3) and fclose(3).
Add simple wrapper functions for fopen(3) and fclose(3) that are somewhat akin to the nxt_file_open() and nxt_file_close() wrappers that log errors.
Added simple wrappers for fopen(3) and fclose(3).
Add simple wrapper functions for fopen(3) and fclose(3) that are somewhat akin to the nxt_file_open() and nxt_file_close() wrappers that log errors.
Suggested-by: Alejandro Colomar <alx@nginx.com> Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
Revision tags: 1.28.0-1, 1.28.0, 1.27.0-1, 1.27.0, 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0, 1.25.0-1, 1.25.0, 1.24.0-1, 1.24.0 |
|
#
1855:a946d8cd7f8c |
| 29-Apr-2021 |
Zhidao HONG |
Static: support for openat2() features.
Support for chrooting, rejecting symlinks, and rejecting crossing mounting points on a per-request basis during static file serving.
|
Revision tags: 1.23.0-1, 1.23.0, 1.22.0-1, 1.22.0, 1.21.0-1, 1.21.0, 1.20.0-1, 1.20.0, 1.19.0-1, 1.19.0, 1.18.0-1, 1.18.0, 1.17.0-1, 1.17.0, 1.16.0-1, 1.16.0, 1.15.0-1, 1.15.0, 1.14.0-1, 1.14.0, 1.13.0-1, 1.13.0, 1.12.0-1, 1.12.0, 1.11.0-2, 1.11.0-1, 1.11.0, 1.10.0-2, 1.10.0-1, 1.10.0, 1.9.0-1, 1.9.0, 1.8.0-1, 1.8.0, 1.7.1-1, 1.7.1, 1.7-1, 1.7, 1.6-1, 1.6, 1.5-1, 1.5, 1.4-2, 1.4, 1.3, 1.2, 1.1, 1.0, 0.7 |
|
#
564:762f8c976ead |
| 05-Mar-2018 |
Valentin Bartenev |
Reduced number of critical log levels.
|
Revision tags: 0.6, 0.5 |
|
#
521:93dc4a28dd37 |
| 07-Feb-2018 |
Andrey Zelenkov |
Style fixes.
|
#
494:7c83ddcc1c42 |
| 24-Jan-2018 |
Sergey Kandaurov |
Fixed formatting in nxt_sprintf() and logging.
|
Revision tags: 0.4, 0.3, 0.2, 0.1 |
|
#
20:4dc92b438f58 |
| 09-Mar-2017 |
Igor Sysoev |
Processes refactoring. The cycle has been renamed to the runtime.
|
#
13:3a52b2c3d3f1 |
| 22-Feb-2017 |
Igor Sysoev |
I/O operations refactoring.
|
#
0:a63ceefd6ab0 |
| 17-Jan-2017 |
Igor Sysoev |
Initial version.
|