mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
creds: Add struct for ancillary data
To support later patches that add sending/receiving file descriptors, let's add this struct. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
26908afff7
commit
cc7a317e85
1 changed files with 13 additions and 0 deletions
|
|
@ -29,8 +29,12 @@
|
|||
#endif
|
||||
|
||||
#include <pulsecore/socket.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define MAX_ANCIL_FDS (2)
|
||||
|
||||
typedef struct pa_creds pa_creds;
|
||||
typedef struct pa_ancil pa_ancil;
|
||||
|
||||
#if defined(SCM_CREDENTIALS)
|
||||
|
||||
|
|
@ -41,6 +45,15 @@ struct pa_creds {
|
|||
uid_t uid;
|
||||
};
|
||||
|
||||
/* Struct for handling ancillary data, i e, extra data that can be sent together with a message
|
||||
over unix pipes. Supports sending and receiving credentials and file descriptors. */
|
||||
struct pa_ancil {
|
||||
pa_creds creds;
|
||||
bool creds_valid;
|
||||
int nfd;
|
||||
int fds[MAX_ANCIL_FDS];
|
||||
};
|
||||
|
||||
#else
|
||||
#undef HAVE_CREDS
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue