Searched refs:ucred (Results 1 - 25 of 35) sorted by relevance

12

/systemd/src/journal/
H A Djournald-console.h24 void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
H A Djournald-wall.h24 void server_forward_wall(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
H A Djournald-audit.h25 void server_process_audit_message(Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const union sockaddr_union *sa, socklen_t salen);
H A Djournald-syslog.h28 void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred, const struct timeval *tv);
30 void server_process_syslog_message(Server *s, const char *buf, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len);
H A Djournald-kmsg.h27 void server_forward_kmsg(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
H A Djournald-native.h31 void server_process_native_message(Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len);
33 void server_process_native_file(Server *s, int fd, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len);
H A Djournald-wall.c33 const struct ucred *ucred) {
45 if (ucred) {
47 get_process_comm(ucred->pid, &ident_buf);
51 if (asprintf(&l_buf, "%s["PID_FMT"]: %s", strempty(identifier), ucred->pid, message) < 0) {
28 server_forward_wall( Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred) argument
H A Djournald-console.c56 const struct ucred *ucred) {
82 if (ucred) {
84 get_process_comm(ucred->pid, &ident_buf);
88 xsprintf(header_pid, "["PID_FMT"]: ", ucred->pid);
51 server_forward_console( Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred) argument
H A Djournald-syslog.c45 static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, const struct ucred *ucred, const struct timeval *tv) { argument
61 uint8_t buf[CMSG_SPACE(sizeof(struct ucred))];
68 if (ucred) {
76 cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred));
77 memcpy(CMSG_DATA(cmsg), ucred, sizeof(struct ucred)); local
95 if (ucred && (errno == ESRCH || errno == EPERM)) {
96 struct ucred u;
102 u = *ucred;
119 forward_syslog_raw(Server *s, int priority, const char *buffer, const struct ucred *ucred, const struct timeval *tv) argument
132 server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred, const struct timeval *tv) argument
318 server_process_syslog_message( Server *s, const char *buf, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len) argument
[all...]
H A Djournald-native.c78 static bool allow_object_pid(const struct ucred *ucred) { argument
79 return ucred && ucred->uid == 0;
85 const struct ucred *ucred,
122 server_dispatch_message(s, iovec, n, m, ucred, tv, label, label_len, NULL, priority, object_pid);
206 allow_object_pid(ucred)) {
281 server_forward_syslog(s, priority, identifier, message, ucred, tv);
284 server_forward_kmsg(s, priority, identifier, message, ucred);
82 server_process_native_message( Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len) argument
310 server_process_native_file( Server *s, int fd, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len) argument
[all...]
H A Djournald-server.c575 const struct ucred *ucred,
612 if (ucred) {
613 realuid = ucred->uid;
615 sprintf(pid, "_PID="PID_FMT, ucred->pid);
618 sprintf(uid, "_UID="UID_FMT, ucred->uid);
621 sprintf(gid, "_GID="GID_FMT, ucred->gid);
624 r = get_process_comm(ucred->pid, &t);
631 r = get_process_exe(ucred->pid, &t);
638 r = get_process_cmdline(ucred
572 dispatch_message_real( Server *s, struct iovec *iovec, unsigned n, unsigned m, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len, const char *unit_id, int priority, pid_t object_pid) argument
862 struct ucred ucred = {}; local
910 server_dispatch_message( Server *s, struct iovec *iovec, unsigned n, unsigned m, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len, const char *unit_id, int priority, pid_t object_pid) argument
1154 struct ucred *ucred = NULL; local
[all...]
H A Djournald-kmsg.c46 const struct ucred *ucred) {
74 if (ucred) {
76 get_process_comm(ucred->pid, &ident_buf);
80 xsprintf(header_pid, "["PID_FMT"]: ", ucred->pid);
41 server_forward_kmsg( Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred) argument
H A Djournald-stream.c69 struct ucred ucred; member in struct:StdoutStream
249 server_forward_syslog(s->server, syslog_fixup_facility(priority), s->identifier, p, &s->ucred, NULL);
252 server_forward_kmsg(s->server, priority, s->identifier, p, &s->ucred);
255 server_forward_console(s->server, priority, s->identifier, p, &s->ucred);
258 server_forward_wall(s->server, priority, s->identifier, p, &s->ucred);
281 server_dispatch_message(s->server, iovec, n, ELEMENTSOF(iovec), &s->ucred, NULL, s->label, label_len, s->unit_id, priority, 0);
310 if (s->ucred.uid == 0) {
490 r = getpeercred(fd, &stream->ucred);
H A Djournald-server.h160 void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigned m, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len, const char *unit_id, int priority, pid_t object_pid);
H A Djournald-audit.c430 const struct ucred *ucred,
452 if (!ucred || ucred->pid != 0) {
426 server_process_audit_message( Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const union sockaddr_union *sa, socklen_t salen) argument
/systemd/src/bus-proxyd/
H A Ddriver.h27 int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPolicy *sp, const struct ucred *ucred, Set *owned_names);
H A Dproxy.h33 struct ucred local_creds;
/systemd/src/libsystemd/sd-login/
H A Dsd-login.c141 struct ucred ucred = {}; local
147 r = getpeercred(fd, &ucred);
151 return cg_pid_get_session(ucred.pid, session);
155 struct ucred ucred; local
161 r = getpeercred(fd, &ucred);
165 return cg_pid_get_owner_uid(ucred.pid, uid);
169 struct ucred ucred; local
183 struct ucred ucred; local
197 struct ucred ucred; local
211 struct ucred ucred; local
225 struct ucred ucred; local
239 struct ucred ucred; local
[all...]
/systemd/src/libsystemd/sd-daemon/
H A Dsd-daemon.c471 (have_pid ? CMSG_SPACE(sizeof(struct ucred)) : 0);
488 struct ucred *ucred; local
492 cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred));
494 ucred = (struct ucred*) CMSG_DATA(cmsg);
495 ucred->pid = pid;
496 ucred->uid = getuid();
497 ucred->gid = getgid();
501 /* First try with fake ucred dat
[all...]
/systemd/src/udev/
H A Dudev-ctrl.c176 struct ucred ucred = {}; local
194 r = getpeercred(conn->sock, &ucred);
199 if (ucred.uid > 0) {
200 log_error("sender uid="UID_FMT", message ignored", ucred.uid);
329 char cred_msg[CMSG_SPACE(sizeof(struct ucred))];
336 struct ucred *cred;
389 cred = (struct ucred *) CMSG_DATA(cmsg);
/systemd/src/basic/
H A Dsocket-util.h126 int getpeercred(int fd, struct ucred *ucred);
H A Dsocket-util.c614 struct ucred ucred = {}; local
619 r = getpeercred(fd, &ucred);
623 if (asprintf(ret, "PID "PID_FMT"/UID "UID_FMT, ucred.pid, ucred.uid) < 0)
797 int getpeercred(int fd, struct ucred *ucred) { argument
798 socklen_t n = sizeof(struct ucred);
799 struct ucred u;
803 assert(ucred);
[all...]
/systemd/src/shared/
H A Dask-password-api.c564 struct ucred *ucred; local
567 uint8_t buf[CMSG_SPACE(sizeof(struct ucred))];
632 if (msghdr.msg_controllen < CMSG_LEN(sizeof(struct ucred)) ||
635 control.cmsghdr.cmsg_len != CMSG_LEN(sizeof(struct ucred))) {
640 ucred = (struct ucred*) CMSG_DATA(&control.cmsghdr);
641 if (ucred->uid != 0) {
/systemd/src/import/
H A Dimportd.c568 uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
577 struct ucred *ucred = NULL; local
600 cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred)))
601 ucred = (struct ucred*) CMSG_DATA(cmsg);
608 if (!ucred || ucred->pid <= 0) {
614 if (ucred->pid == t->pid)
/systemd/src/login/
H A Dpam_systemd.c132 struct ucred ucred; local
156 r = getpeercred(fd, &ucred);
160 r = get_ctty(ucred.pid, NULL, &tty);

Completed in 540 milliseconds

12