SD_BUS_QUERY_SENDER_CREDS - Online Linux Manual PageSection : 3
Updated :
Source : systemd 250
Note : sd_bus_query_sender_creds
NAMEsd_bus_query_sender_creds, sd_bus_query_sender_privilege − Query bus message sender credentials/privileges
SYNOPSIS#include <systemd/sd−bus.h>int sd_bus_query_sender_creds(sd_bus_message *m, uint64_t mask, sd_bus_creds **creds); sd_bus_error* sd_bus_query_sender_privilege(sd_bus_message *m, int capability);
DESCRIPTIONsd_bus_query_sender_creds() returns the credentials of the message m. The mask parameter is a combo of SD_BUS_CREDS_* flags that indicate which credential info the caller is interested in. See sd_bus_creds_new_from_pid(3) for a list of possible flags. First, this message checks if the requested credentials are attached to the message itself. If not, but the message contains the pid of the sender and the caller specified the SD_BUS_CREDS_AUGMENT flag, this function tries to figure out the missing credentials via other means (starting from the pid). If the pid isn't available but the message has a sender, this function calls sd_bus_get_name_creds(3) to get the requested credentials. If the message has no sender (when a direct connection is used), this function calls sd_bus_get_owner_creds(3) to get the requested credentials. On success, the requested credentials are stored in creds. Ownership of the credentials object in creds is transferred to the caller and should be freed by calling sd_bus_creds_unref(3). sd_bus_query_sender_privilege() checks if the message m has the requested privileges. If capability is a non−negative integer, this function checks if the message has the capability with the same value. See capabilities(7) for a list of capabilities. If capability is a negative integer, this function returns whether the sender of the message runs as the same user as the receiver of the message, or if the sender of the message runs as root and the receiver of the message does not run as root. On success and if the message has the requested privileges, this function returns a positive integer. If the message does not have the requested privileges, this function returns zero.
RETURN VALUEOn success, these functions return a non−negative integer. On failure, they return a negative errno−style error code.
ErrorsReturned errors may indicate the following problems: −EINVAL The message m or an output parameter is NULL. −ENOTCONN The bus of m is not connected. −ECHILD The bus of m was created in a different process. −EPERM The message m is not sealed.
NOTESThese APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd pkg-config(1) file.
SEE ALSOsystemd(1), sd-bus(3), sd_bus_creds_new_from_pid(3), sd_bus_get_name_creds(3), sd_bus_get_owner_creds(3), sd_bus_creds_unref(3), capabilities(7) 0
Johanes Gumabo
Data Size : 11,238 byte
man-sd_bus_query_sender_creds.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 193,630
Visitor ID : :
Visitor IP : 3.138.174.45 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.