mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
auth: move cookie file to ~/.config/pulse/cookie
In order to follow XDG basedir, read the cookie file from ~/.config/pulse/cookie if possible, but fall back to the old file. if it doesn't exist.
This commit is contained in:
parent
9ab510a692
commit
87ae830705
14 changed files with 57 additions and 32 deletions
|
|
@ -42,7 +42,7 @@ struct pa_auth_cookie {
|
|||
size_t size;
|
||||
};
|
||||
|
||||
pa_auth_cookie* pa_auth_cookie_get(pa_core *core, const char *cn, size_t size) {
|
||||
pa_auth_cookie* pa_auth_cookie_get(pa_core *core, const char *cn, pa_bool_t create, size_t size) {
|
||||
pa_auth_cookie *c;
|
||||
char *t;
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ pa_auth_cookie* pa_auth_cookie_get(pa_core *core, const char *cn, size_t size) {
|
|||
|
||||
pa_assert_se(pa_shared_set(core, t, c) >= 0);
|
||||
|
||||
if (pa_authkey_load_auto(cn, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
|
||||
if (pa_authkey_load_auto(cn, create, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
|
||||
pa_auth_cookie_unref(c);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue