mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
core-util: Fix permissions handling while creating directories
This makes updating of permissions on existing directories optional with pa_make_secure_dir() and pa_make_secure_parent_dir(). This makes sure that the recursive directory creation doesn't end up modifying existing directories, and also fixes a problem where creating an auth cookie (specifically ~/.esd_auth) would end up modifying permissions on ~. Thanks to Frédéric Danis for reporting this.
This commit is contained in:
parent
508ca489d2
commit
1ff604c298
5 changed files with 20 additions and 15 deletions
|
|
@ -58,8 +58,8 @@ struct timeval;
|
|||
void pa_make_fd_nonblock(int fd);
|
||||
void pa_make_fd_cloexec(int fd);
|
||||
|
||||
int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid);
|
||||
int pa_make_secure_parent_dir(const char *fn, mode_t, uid_t uid, gid_t gid);
|
||||
int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid, pa_bool_t update_perms);
|
||||
int pa_make_secure_parent_dir(const char *fn, mode_t, uid_t uid, gid_t gid, pa_bool_t update_perms);
|
||||
|
||||
ssize_t pa_read(int fd, void *buf, size_t count, int *type);
|
||||
ssize_t pa_write(int fd, const void *buf, size_t count, int *type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue