index.html
Main Page
|
modules.html
Modules
|
namespaces.html
Namespace List
|
hierarchy.html
Class Hierarchy
|
annotated.html
Data Structures
|
dirs.html
Directories
|
files.html
File List
|
namespacemembers.html
Namespace Members
|
functions.html
Data Fields
|
pages.html
Related Pages
Utilities and portability
[
group__DBusInternals.html
D-BUS internal implementation details
]
Utility functions (
group__DBusInternalsUtils.html#ga130
_dbus_assert()
,
group__DBusInternalsUtils.html#ga7
_dbus_warn()
, etc.
#_details
More...
Data Structures
struct
structDBusBabysitter.html
DBusBabysitter
Babysitter implementation details.
structDBusBabysitter.html#_details
More...
struct
structDBusDirIter.html
DBusDirIter
Internals of directory iterator.
structDBusDirIter.html#_details
More...
Defines
#define
group__DBusInternalsUtils.html#ga130
_dbus_assert
(condition)
Aborts with an error message if the condition is false.
#ga130
#define
group__DBusInternalsUtils.html#ga131
_dbus_assert_not_reached
(explanation)
Aborts with an error message if called.
#ga131
#define
group__DBusInternalsUtils.html#ga132
_DBUS_N_ELEMENTS
(array)   ((int) (sizeof ((array)) / sizeof ((array)[0])))
Computes the number of elements in a fixed-size array using sizeof().
#ga132
#define
group__DBusInternalsUtils.html#ga133
_DBUS_POINTER_TO_INT
(pointer)   ((long)(pointer))
Safely casts a void* to an integer; should only be used on void* that actually contain integers, for example one created with _DBUS_INT_TO_POINTER.
#ga133
#define
group__DBusInternalsUtils.html#ga134
_DBUS_INT_TO_POINTER
(integer)   ((void*)((long)(integer)))
Safely stuffs an integer into a pointer, to be extracted later with _DBUS_POINTER_TO_INT.
#ga134
#define
group__DBusInternalsUtils.html#ga135
_DBUS_ZERO
(object)   (memset (&(object), '\0', sizeof ((object))))
Sets all bits in an object to zero.
#ga135
#define
group__DBusInternalsUtils.html#ga136
_DBUS_INT16_MIN
((
group__DBusTypes.html#ga6
dbus_int16_t
) 0x8000)
Minimum value of type "int16".
#define
group__DBusInternalsUtils.html#ga137
_DBUS_INT16_MAX
((
group__DBusTypes.html#ga6
dbus_int16_t
) 0x7fff)
Maximum value of type "int16".
#define
group__DBusInternalsUtils.html#ga138
_DBUS_UINT16_MAX
((
group__DBusTypes.html#ga5
dbus_uint16_t
)0xffff)
Maximum value of type "uint16".
#define
group__DBusInternalsUtils.html#ga139
_DBUS_INT32_MIN
((
group__DBusTypes.html#ga4
dbus_int32_t
) 0x80000000)
Minimum value of type "int32".
#define
group__DBusInternalsUtils.html#ga140
_DBUS_INT32_MAX
((
group__DBusTypes.html#ga4
dbus_int32_t
) 0x7fffffff)
Maximum value of type "int32".
#define
group__DBusInternalsUtils.html#ga141
_DBUS_UINT32_MAX
((
group__DBusTypes.html#ga3
dbus_uint32_t
)0xffffffff)
Maximum value of type "uint32".
#define
group__DBusInternalsUtils.html#ga142
_DBUS_INT_MIN
_DBUS_INT32_MIN
Minimum value of type "int".
#define
group__DBusInternalsUtils.html#ga143
_DBUS_INT_MAX
_DBUS_INT32_MAX
Maximum value of type "int".
#define
group__DBusInternalsUtils.html#ga144
_DBUS_UINT_MAX
_DBUS_UINT32_MAX
Maximum value of type "uint".
#define
group__DBusInternalsUtils.html#ga145
_DBUS_LOCK_NAME
(name)   _dbus_lock_##name
Expands to name of a global lock variable.
#define
group__DBusInternalsUtils.html#ga146
_DBUS_DEFINE_GLOBAL_LOCK
(name)   DBusMutex         *_dbus_lock_##name
Defines a global lock variable with the given name.
#ga146
#define
group__DBusInternalsUtils.html#ga147
_DBUS_DECLARE_GLOBAL_LOCK
(name)   extern DBusMutex  *_dbus_lock_##name
Expands to declaration of a global lock defined with _DBUS_DEFINE_GLOBAL_LOCK.
#ga147
#define
group__DBusInternalsUtils.html#ga148
_DBUS_LOCK
(name)   _dbus_mutex_lock   (_dbus_lock_##name)
Locks a global lock.
#define
group__DBusInternalsUtils.html#ga149
_DBUS_UNLOCK
(name)   _dbus_mutex_unlock (_dbus_lock_##name)
Unlocks a global lock.
#define
group__DBusInternalsUtils.html#ga150
LIVE_CHILDREN
(sitter)   ((sitter)->socket_to_babysitter >= 0 || (sitter)->error_pipe_from_child >= 0)
Macro returns
group__DBusMacros.html#ga2
TRUE
if the babysitter still has live sockets open to the babysitter child or the grandchild.
#define
group__DBusInternalsUtils.html#ga151
READ_END
0
Helps remember which end of the pipe is which.
#define
group__DBusInternalsUtils.html#ga152
WRITE_END
1
Helps remember which end of the pipe is which.
#define
group__DBusInternalsUtils.html#ga153
_DBUS_MAX_SUN_PATH_LENGTH
99
Maximum length of the path to a UNIX domain socket, sockaddr_un::sun_path member.
#ga153
#define
group__DBusInternalsUtils.html#ga154
NANOSECONDS_PER_SECOND
1000000000
nanoseconds in a second
#define
group__DBusInternalsUtils.html#ga155
MICROSECONDS_PER_SECOND
1000000
microseconds in a second
#define
group__DBusInternalsUtils.html#ga156
MILLISECONDS_PER_SECOND
1000
milliseconds in a second
#define
group__DBusInternalsUtils.html#ga157
NANOSECONDS_PER_MILLISECOND
1000000
nanoseconds in a millisecond
#define
group__DBusInternalsUtils.html#ga158
MICROSECONDS_PER_MILLISECOND
1000
microseconds in a millisecond
Typedefs
typedef void(*
group__DBusInternalsUtils.html#ga161
DBusForeachFunction
)(void *element, void *data)
Used to iterate over each item in a collection, such as a
structDBusList.html
DBusList
.
Enumerations
enum
group__DBusInternalsUtils.html#ga159
ReadStatus
{
group__DBusInternalsUtils.html#gga159a4
READ_STATUS_OK
,
group__DBusInternalsUtils.html#gga159a5
READ_STATUS_ERROR
,
group__DBusInternalsUtils.html#gga159a6
READ_STATUS_EOF
}
Enumeration for status of a read().
group__DBusInternalsUtils.html#ga159
More...
enum
{
CHILD_EXITED
,
CHILD_FORK_FAILED
,
CHILD_EXEC_FAILED
,
CHILD_PID
}
Functions
void
group__DBusInternalsUtils.html#ga7
_dbus_warn
(const char *format,...)
Prints a warning message to stderr.
#ga7
char *
group__DBusInternalsUtils.html#ga8
_dbus_strdup
(const char *str)
Duplicates a string.
#ga8
void *
group__DBusInternalsUtils.html#ga9
_dbus_memdup
(const void *mem, size_t n_bytes)
Duplicates a block of memory.
#ga9
char **
group__DBusInternalsUtils.html#ga10
_dbus_dup_string_array
(const char **array)
Duplicates a string array.
#ga10
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga11
_dbus_string_array_contains
(const char **array, const char *str)
Checks whether a string array contains the given string.
#ga11
structDBusBabysitter.html
DBusBabysitter
*
group__DBusInternalsUtils.html#ga15
_dbus_babysitter_ref
(
structDBusBabysitter.html
DBusBabysitter
*sitter)
Increment the reference count on the babysitter object.
#ga15
void
group__DBusInternalsUtils.html#ga16
_dbus_babysitter_unref
(
structDBusBabysitter.html
DBusBabysitter
*sitter)
Decrement the reference count on the babysitter object.
#ga16
void
group__DBusInternalsUtils.html#ga23
_dbus_babysitter_kill_child
(
structDBusBabysitter.html
DBusBabysitter
*sitter)
Blocks until the babysitter process gives us the PID of the spawned grandchild, then kills the spawned grandchild.
#ga23
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga24
_dbus_babysitter_get_child_exited
(
structDBusBabysitter.html
DBusBabysitter
*sitter)
Checks whether the child has exited, without blocking.
#ga24
void
group__DBusInternalsUtils.html#ga25
_dbus_babysitter_set_child_exit_error
(
structDBusBabysitter.html
DBusBabysitter
*sitter,
structDBusError.html
DBusError
*error)
Sets the
structDBusError.html
DBusError
with an explanation of why the spawned child process exited (on a signal, or whatever).
#ga25
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga26
_dbus_babysitter_set_watch_functions
(
structDBusBabysitter.html
DBusBabysitter
*sitter, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void *data,
group__DBusMemory.html#ga8
DBusFreeFunction
free_data_function)
Sets watch functions to notify us when the babysitter object needs to read/write file descriptors.
#ga26
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga38
_dbus_spawn_async_with_babysitter
(
structDBusBabysitter.html
DBusBabysitter
**sitter_p, char **argv, DBusSpawnChildSetupFunc child_setup, void *user_data,
structDBusError.html
DBusError
*error)
Spawns a new process.
#ga38
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga39
_dbus_become_daemon
(const
structDBusString.html
DBusString
*pidfile, int print_pid_fd,
structDBusError.html
DBusError
*error)
Does the chdir, fork, setsid, etc.
#ga39
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga40
_dbus_write_pid_file
(const
structDBusString.html
DBusString
*filename, unsigned long pid,
structDBusError.html
DBusError
*error)
Creates a file containing the process ID.
#ga40
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga41
_dbus_change_identity
(dbus_uid_t uid, dbus_gid_t gid,
structDBusError.html
DBusError
*error)
Changes the user and group the bus is running as.
#ga41
void
group__DBusInternalsUtils.html#ga42
_dbus_set_signal_handler
(int sig, DBusSignalHandler handler)
Installs a UNIX signal handler.
#ga42
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga43
_dbus_delete_directory
(const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Removes a directory; Directory must be empty.
#ga43
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga44
_dbus_file_exists
(const char *file)
Checks if a file exists.
#ga44
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga45
_dbus_user_at_console
(const char *username,
structDBusError.html
DBusError
*error)
Checks if user is at the console.
#ga45
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga46
_dbus_path_is_absolute
(const
structDBusString.html
DBusString
*filename)
Checks whether the filename is an absolute path.
#ga46
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga47
_dbus_stat
(const
structDBusString.html
DBusString
*filename,
structDBusStat.html
DBusStat
*statbuf,
structDBusError.html
DBusError
*error)
stat() wrapper.
#ga47
structDBusDirIter.html
DBusDirIter
*
group__DBusInternalsUtils.html#ga48
_dbus_directory_open
(const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Open a directory to iterate over.
#ga48
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga49
_dbus_directory_get_next_file
(
structDBusDirIter.html
DBusDirIter
*iter,
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Get next file in the directory.
#ga49
void
group__DBusInternalsUtils.html#ga50
_dbus_directory_close
(
structDBusDirIter.html
DBusDirIter
*iter)
Closes a directory iteration.
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga53
_dbus_group_info_fill
(
structDBusGroupInfo.html
DBusGroupInfo
*info, const
structDBusString.html
DBusString
*groupname,
structDBusError.html
DBusError
*error)
Initializes the given
structDBusGroupInfo.html
DBusGroupInfo
struct with information about the given group name.
#ga53
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga54
_dbus_group_info_fill_gid
(
structDBusGroupInfo.html
DBusGroupInfo
*info, dbus_gid_t gid,
structDBusError.html
DBusError
*error)
Initializes the given
structDBusGroupInfo.html
DBusGroupInfo
struct with information about the given group ID.
#ga54
void
group__DBusInternalsUtils.html#ga55
_dbus_group_info_free
(
structDBusGroupInfo.html
DBusGroupInfo
*info)
Frees the members of info (but not info itself).
#ga55
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga56
_dbus_setenv
(const char *varname, const char *value)
Wrapper for setenv().
#ga56
const char *
group__DBusInternalsUtils.html#ga57
_dbus_getenv
(const char *varname)
Wrapper for getenv().
#ga57
int
group__DBusInternalsUtils.html#ga58
_dbus_read
(int fd,
structDBusString.html
DBusString
*buffer, int count)
Thin wrapper around the read() system call that appends the data it reads to the
structDBusString.html
DBusString
buffer.
#ga58
int
group__DBusInternalsUtils.html#ga59
_dbus_write
(int fd, const
structDBusString.html
DBusString
*buffer, int start, int len)
Thin wrapper around the write() system call that writes a part of a
structDBusString.html
DBusString
and handles EINTR for you.
#ga59
int
group__DBusInternalsUtils.html#ga60
_dbus_write_two
(int fd, const
structDBusString.html
DBusString
*buffer1, int start1, int len1, const
structDBusString.html
DBusString
*buffer2, int start2, int len2)
Like
group__DBusInternalsUtils.html#ga59
_dbus_write()
but will use writev() if possible to write both buffers in sequence.
#ga60
int
group__DBusInternalsUtils.html#ga61
_dbus_connect_unix_socket
(const char *path,
group__DBusTypes.html#ga2
dbus_bool_t
abstract,
structDBusError.html
DBusError
*error)
Creates a socket and connects it to the UNIX domain socket at the given path.
#ga61
int
group__DBusInternalsUtils.html#ga62
_dbus_listen_unix_socket
(const char *path,
group__DBusTypes.html#ga2
dbus_bool_t
abstract,
structDBusError.html
DBusError
*error)
Creates a socket and binds it to the given path, then listens on the socket.
#ga62
int
group__DBusInternalsUtils.html#ga63
_dbus_connect_tcp_socket
(const char *host,
group__DBusTypes.html#ga3
dbus_uint32_t
port,
structDBusError.html
DBusError
*error)
Creates a socket and connects to a socket at the given host and port.
#ga63
int
group__DBusInternalsUtils.html#ga64
_dbus_listen_tcp_socket
(const char *host,
group__DBusTypes.html#ga3
dbus_uint32_t
port,
structDBusError.html
DBusError
*error)
Creates a socket and binds it to the given path, then listens on the socket.
#ga64
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga66
_dbus_read_credentials_unix_socket
(int client_fd,
structDBusCredentials.html
DBusCredentials
*credentials,
structDBusError.html
DBusError
*error)
Reads a single byte which must be nul (an error occurs otherwise), and reads unix credentials if available.
#ga66
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga67
_dbus_send_credentials_unix_socket
(int server_fd,
structDBusError.html
DBusError
*error)
Sends a single nul byte with our UNIX credentials as ancillary data.
#ga67
int
group__DBusInternalsUtils.html#ga68
_dbus_accept
(int listen_fd)
Accepts a connection on a listening socket.
#ga68
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga71
_dbus_user_info_fill
(
structDBusUserInfo.html
DBusUserInfo
*info, const
structDBusString.html
DBusString
*username,
structDBusError.html
DBusError
*error)
Gets user info for the given username.
#ga71
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga72
_dbus_user_info_fill_uid
(
structDBusUserInfo.html
DBusUserInfo
*info, dbus_uid_t uid,
structDBusError.html
DBusError
*error)
Gets user info for the given user ID.
#ga72
void
group__DBusInternalsUtils.html#ga73
_dbus_user_info_free
(
structDBusUserInfo.html
DBusUserInfo
*info)
Frees the members of info (but not info itself).
#ga73
void
group__DBusInternalsUtils.html#ga74
_dbus_credentials_clear
(
structDBusCredentials.html
DBusCredentials
*credentials)
Sets fields in
structDBusCredentials.html
DBusCredentials
to DBUS_PID_UNSET, DBUS_UID_UNSET, DBUS_GID_UNSET.
#ga74
void
group__DBusInternalsUtils.html#ga75
_dbus_credentials_from_current_process
(
structDBusCredentials.html
DBusCredentials
*credentials)
Gets the credentials of the current process.
#ga75
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga76
_dbus_credentials_match
(const
structDBusCredentials.html
DBusCredentials
*expected_credentials, const
structDBusCredentials.html
DBusCredentials
*provided_credentials)
Checks whether the provided_credentials are allowed to log in as the expected_credentials.
#ga76
unsigned long
group__DBusInternalsUtils.html#ga77
_dbus_getpid
(void)
Gets our process ID.
#ga77
dbus_uid_t
group__DBusInternalsUtils.html#ga78
_dbus_getuid
(void)
Gets our UID.
#ga78
group__DBusTypes.html#ga4
dbus_int32_t
group__DBusInternalsUtils.html#ga80
_dbus_atomic_inc
(
structDBusAtomic.html
DBusAtomic
*atomic)
Atomically increments an integer.
#ga80
group__DBusTypes.html#ga4
dbus_int32_t
group__DBusInternalsUtils.html#ga81
_dbus_atomic_dec
(
structDBusAtomic.html
DBusAtomic
*atomic)
Atomically decrement an integer.
#ga81
int
group__DBusInternalsUtils.html#ga82
_dbus_poll
(
structDBusPollFD.html
DBusPollFD
*fds, int n_fds, int timeout_milliseconds)
Wrapper for poll().
#ga82
void
group__DBusInternalsUtils.html#ga83
_dbus_sleep_milliseconds
(int milliseconds)
Sleeps the given number of milliseconds.
#ga83
void
group__DBusInternalsUtils.html#ga84
_dbus_get_current_time
(long *tv_sec, long *tv_usec)
Get current time, as in gettimeofday().
#ga84
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga85
_dbus_file_get_contents
(
structDBusString.html
DBusString
*str, const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Appends the contents of the given file to the string, returning error code.
#ga85
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga86
_dbus_string_save_to_file
(const
structDBusString.html
DBusString
*str, const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Writes a string out to a file.
#ga86
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga87
_dbus_create_file_exclusively
(const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Creates the given file, failing if the file already exists.
#ga87
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga88
_dbus_delete_file
(const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Deletes the given file.
#ga88
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga89
_dbus_create_directory
(const
structDBusString.html
DBusString
*filename,
structDBusError.html
DBusError
*error)
Creates a directory; succeeds if the directory is created or already existed.
#ga89
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga90
_dbus_concat_dir_and_file
(
structDBusString.html
DBusString
*dir, const
structDBusString.html
DBusString
*next_component)
Appends the given filename to the given directory.
#ga90
void
group__DBusInternalsUtils.html#ga93
_dbus_generate_random_bytes_buffer
(char *buffer, int n_bytes)
Fills n_bytes of the given buffer with random bytes.
#ga93
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga94
_dbus_generate_random_bytes
(
structDBusString.html
DBusString
*str, int n_bytes)
Generates the given number of random bytes, using the best mechanism we can come up with.
#ga94
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga95
_dbus_generate_random_ascii
(
structDBusString.html
DBusString
*str, int n_bytes)
Generates the given number of random bytes, where the bytes are chosen from the alphanumeric ASCII subset.
#ga95
const char *
group__DBusInternalsUtils.html#ga96
_dbus_strerror
(int error_number)
A wrapper around strerror() because some platforms may be lame and not have strerror().
#ga96
void
group__DBusInternalsUtils.html#ga97
_dbus_disable_sigpipe
(void)
signal (SIGPIPE, SIG_IGN);
void
group__DBusInternalsUtils.html#ga98
_dbus_fd_set_close_on_exec
(int fd)
Sets the file descriptor to be close on exec.
#ga98
const char *
group__DBusInternalsUtils.html#ga99
_dbus_error_from_errno
(int error_number)
Converts a UNIX errno into a
structDBusError.html
DBusError
name.
#ga99
void
group__DBusInternalsUtils.html#ga100
_dbus_exit
(int code)
Exit the process, returning the given value.
#ga100
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga101
_dbus_close
(int fd,
structDBusError.html
DBusError
*error)
Closes a file descriptor.
#ga101
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga102
_dbus_set_fd_nonblocking
(int fd,
structDBusError.html
DBusError
*error)
Sets a file descriptor to be nonblocking.
#ga102
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga103
_dbus_parse_uid
(const
structDBusString.html
DBusString
*uid_str, dbus_uid_t *uid)
Gets a UID from a UID string.
#ga103
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga104
_dbus_full_duplex_pipe
(int *fd1, int *fd2,
group__DBusTypes.html#ga2
dbus_bool_t
blocking,
structDBusError.html
DBusError
*error)
Creates a full-duplex pipe (as in socketpair()).
#ga104
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga105
_dbus_is_console_user
(dbus_uid_t uid,
structDBusError.html
DBusError
*error)
Checks to see if the UID sent in is the console user.
#ga105
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga106
_dbus_credentials_from_uid
(dbus_uid_t uid,
structDBusCredentials.html
DBusCredentials
*credentials)
Gets the credentials corresponding to the given UID.
#ga106
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga107
_dbus_get_user_id
(const
structDBusString.html
DBusString
*username, dbus_uid_t *uid)
Gets user ID given username.
#ga107
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga108
_dbus_get_group_id
(const
structDBusString.html
DBusString
*groupname, dbus_gid_t *gid)
Gets group ID given groupname.
#ga108
structDBusGroupInfo.html
DBusGroupInfo
*
group__DBusInternalsUtils.html#ga109
_dbus_user_database_lookup_group
(DBusUserDatabase *db, dbus_gid_t gid, const
structDBusString.html
DBusString
*groupname,
structDBusError.html
DBusError
*error)
Looks up a gid or group name in the user database.
#ga109
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga110
_dbus_user_database_get_groupname
(DBusUserDatabase *db, const
structDBusString.html
DBusString
*groupname, const
structDBusGroupInfo.html
DBusGroupInfo
**info,
structDBusError.html
DBusError
*error)
Gets the user information for the given group name, returned group info should not be freed.
#ga110
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga111
_dbus_user_database_get_gid
(DBusUserDatabase *db, dbus_gid_t gid, const
structDBusGroupInfo.html
DBusGroupInfo
**info,
structDBusError.html
DBusError
*error)
Gets the user information for the given GID, returned group info should not be freed.
#ga111
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga112
_dbus_user_database_get_groups
(DBusUserDatabase *db, dbus_uid_t uid, dbus_gid_t **group_ids, int *n_group_ids,
structDBusError.html
DBusError
*error)
Gets all groups for a particular user.
#ga112
void
group__DBusInternalsUtils.html#ga113
_dbus_user_info_free_allocated
(
structDBusUserInfo.html
DBusUserInfo
*info)
Frees the given
structDBusUserInfo.html
DBusUserInfo
's members with
group__DBusInternalsUtils.html#ga73
_dbus_user_info_free()
and also calls
group__DBusMemory.html#ga3
dbus_free()
on the block itself.
#ga113
void
group__DBusInternalsUtils.html#ga114
_dbus_group_info_free_allocated
(
structDBusGroupInfo.html
DBusGroupInfo
*info)
Frees the given
structDBusGroupInfo.html
DBusGroupInfo
's members with
group__DBusInternalsUtils.html#ga55
_dbus_group_info_free()
and also calls
group__DBusMemory.html#ga3
dbus_free()
on the block itself.
#ga114
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga115
_dbus_is_a_number
(const
structDBusString.html
DBusString
*str, unsigned long *num)
Checks if a given string is actually a number and converts it if it is.
#ga115
structDBusUserInfo.html
DBusUserInfo
*
group__DBusInternalsUtils.html#ga116
_dbus_user_database_lookup
(DBusUserDatabase *db, dbus_uid_t uid, const
structDBusString.html
DBusString
*username,
structDBusError.html
DBusError
*error)
Looks up a uid or username in the user database.
#ga116
void
group__DBusInternalsUtils.html#ga119
_dbus_user_database_lock_system
(void)
Locks global system user database.
void
group__DBusInternalsUtils.html#ga120
_dbus_user_database_unlock_system
(void)
Unlocks global system user database.
DBusUserDatabase *
group__DBusInternalsUtils.html#ga121
_dbus_user_database_get_system
(void)
Gets the system global user database; must be called with lock held (
group__DBusInternalsUtils.html#ga119
_dbus_user_database_lock_system()
).
#ga121
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga122
_dbus_username_from_current_process
(const
structDBusString.html
DBusString
**username)
Gets username of user owning current process.
#ga122
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga123
_dbus_homedir_from_current_process
(const
structDBusString.html
DBusString
**homedir)
Gets homedir of user owning current process.
#ga123
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga124
_dbus_homedir_from_username
(const
structDBusString.html
DBusString
*username,
structDBusString.html
DBusString
*homedir)
Gets the home directory for the given user.
#ga124
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga125
_dbus_credentials_from_username
(const
structDBusString.html
DBusString
*username,
structDBusCredentials.html
DBusCredentials
*credentials)
Gets the credentials corresponding to the given username.
#ga125
DBusUserDatabase *
group__DBusInternalsUtils.html#ga126
_dbus_user_database_new
(void)
Creates a new user database object used to look up and cache user information.
#ga126
void
group__DBusInternalsUtils.html#ga127
_dbus_user_database_unref
(DBusUserDatabase *db)
Decrements refcount of user database.
#ga127
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga128
_dbus_user_database_get_uid
(DBusUserDatabase *db, dbus_uid_t uid, const
structDBusUserInfo.html
DBusUserInfo
**info,
structDBusError.html
DBusError
*error)
Gets the user information for the given UID, returned user info should not be freed.
#ga128
group__DBusTypes.html#ga2
dbus_bool_t
group__DBusInternalsUtils.html#ga129
_dbus_user_database_get_username
(DBusUserDatabase *db, const
structDBusString.html
DBusString
*username, const
structDBusUserInfo.html
DBusUserInfo
**info,
structDBusError.html
DBusError
*error)
Gets the user information for the given username.
#ga129
Variables
const char
group__DBusInternalsUtils.html#ga0
_dbus_no_memory_message
[] = "Not enough memory"
Fixed "out of memory" error message, just to avoid making up a different string every time and wasting space.
const char
group__DBusInternalsUtils.html#ga1
_dbus_return_if_fail_warning_format
[]
String used in _dbus_return_if_fail macro.
#ga1
Detailed Description
Utility functions (
group__DBusInternalsUtils.html#ga130
_dbus_assert()
,
group__DBusInternalsUtils.html#ga7
_dbus_warn()
, etc.
)
Define Documentation
#define _dbus_assert
(
condition
)
Aborts with an error message if the condition is false.
Parameters:
condition
condition which must be true.
Definition at line
dbus-internals_8h-source.html#l00100
100
of file
dbus-internals_8h-source.html
dbus-internals.h
.
Referenced by
dbus-auth_8c-source.html#l02407
_dbus_auth_decode_data()
,
dbus-auth_8c-source.html#l02344
_dbus_auth_encode_data()
,
dbus-auth_8c-source.html#l02244
_dbus_auth_get_buffer()
,
dbus-auth_8c-source.html#l02199
_dbus_auth_get_bytes_to_send()
,
dbus-auth_8c-source.html#l02468
_dbus_auth_get_guid_from_server()
,
dbus-auth_8c-source.html#l02059
_dbus_auth_ref()
,
dbus-auth_8c-source.html#l02263
_dbus_auth_return_buffer()
,
dbus-auth_8c-source.html#l02074
_dbus_auth_unref()
,
dbus-spawn_8c-source.html#l00243
_dbus_babysitter_ref()
,
dbus-spawn_8c-source.html#l00262
_dbus_babysitter_unref()
,
dbus-connection_8c-source.html#l02571
_dbus_connection_block_pending_call()
,
dbus-connection_8c-source.html#l00492
_dbus_connection_message_sent()
,
dbus-connection_8c-source.html#l00358
_dbus_connection_queue_received_message_link()
,
dbus-connection_8c-source.html#l01258
_dbus_connection_ref_unlocked()
,
dbus-connection_8c-source.html#l02292
_dbus_connection_send_and_unlock()
,
dbus-connection_8c-source.html#l00640
_dbus_connection_toggle_watch()
,
dbus-connection_8c-source.html#l01282
_dbus_connection_unref_unlocked()
,
dbus-resources_8c-source.html#l00102
_dbus_counter_ref()
,
dbus-resources_8c-source.html#l00118
_dbus_counter_unref()
,
dbus-sysdeps_8c-source.html#l01713
_dbus_credentials_from_current_process()
,
dbus-userdb-util_8c-source.html#l00085
_dbus_credentials_from_uid()
,
dbus-dataslot_8c-source.html#l00067
_dbus_data_slot_allocator_alloc()
,
dbus-dataslot_8c-source.html#l00161
_dbus_data_slot_allocator_free()
,
dbus-dataslot_8c-source.html#l00295
_dbus_data_slot_list_get()
,
dbus-dataslot_8c-source.html#l00233
_dbus_data_slot_list_set()
,
dbus-object-tree_8c-source.html#l01081
_dbus_decompose_path()
,
dbus-sysdeps_8c-source.html#l02523
_dbus_generate_random_ascii()
,
dbus-hash_8c-source.html#l00656
_dbus_hash_iter_get_int_key()
,
dbus-hash_8c-source.html#l00693
_dbus_hash_iter_get_string_key()
,
dbus-hash_8c-source.html#l00675
_dbus_hash_iter_get_ulong_key()
,
dbus-hash_8c-source.html#l00610
_dbus_hash_iter_get_value()
,
dbus-hash_8c-source.html#l00514
_dbus_hash_iter_init()
,
dbus-hash_8c-source.html#l00757
_dbus_hash_iter_lookup()
,
dbus-hash_8c-source.html#l00540
_dbus_hash_iter_next()
,
dbus-hash_8c-source.html#l00589
_dbus_hash_iter_remove_entry()
,
dbus-hash_8c-source.html#l00633
_dbus_hash_iter_set_value()
,
dbus-hash_8c-source.html#l01627
_dbus_hash_table_free_preallocated_entry()
,
dbus-hash_8c-source.html#l01492
_dbus_hash_table_insert_int()
,
dbus-hash_8c-source.html#l01415
_dbus_hash_table_insert_string()
,
dbus-hash_8c-source.html#l01654
_dbus_hash_table_insert_string_preallocated()
,
dbus-hash_8c-source.html#l01577
_dbus_hash_table_insert_ulong()
,
dbus-hash_8c-source.html#l01186
_dbus_hash_table_lookup_int()
,
dbus-hash_8c-source.html#l01134
_dbus_hash_table_lookup_string()
,
dbus-hash_8c-source.html#l01239
_dbus_hash_table_lookup_ulong()
,
dbus-hash_8c-source.html#l00292
_dbus_hash_table_new()
,
dbus-hash_8c-source.html#l01321
_dbus_hash_table_remove_int()
,
dbus-hash_8c-source.html#l01263
_dbus_hash_table_remove_string()
,
dbus-hash_8c-source.html#l01380
_dbus_hash_table_remove_ulong()
,
dbus-marshal-header_8c-source.html#l00518
_dbus_header_create()
,
dbus-marshal-header_8c-source.html#l01386
_dbus_header_delete_field()
,
dbus-marshal-header_8c-source.html#l01321
_dbus_header_get_field_basic()
,
dbus-marshal-header_8c-source.html#l00372
_dbus_header_get_message_type()
,
dbus-marshal-header_8c-source.html#l00660
_dbus_header_have_message_untrusted()
,
dbus-marshal-header_8c-source.html#l00952
_dbus_header_load()
,
dbus-marshal-header_8c-source.html#l01243
_dbus_header_set_field_basic()
,
dbus-marshal-header_8c-source.html#l00390
_dbus_header_set_serial()
,
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
,
dbus-list_8c-source.html#l00734
_dbus_list_copy()
,
dbus-marshal-byteswap_8c-source.html#l00220
_dbus_marshal_byteswap()
,
dbus-marshal-basic_8c-source.html#l00503
_dbus_marshal_read_basic()
,
dbus-marshal-basic_8c-source.html#l00612
_dbus_marshal_read_fixed_multi()
,
dbus-marshal-basic_8c-source.html#l00465
_dbus_marshal_read_uint32()
,
dbus-marshal-basic_8c-source.html#l00382
_dbus_marshal_set_basic()
,
dbus-marshal-basic_8c-source.html#l01131
_dbus_marshal_skip_basic()
,
dbus-marshal-basic_8c-source.html#l00844
_dbus_marshal_write_basic()
,
dbus-marshal-basic_8c-source.html#l01073
_dbus_marshal_write_fixed_multi()
,
dbus-mempool_8c-source.html#l00208
_dbus_mem_pool_alloc()
,
dbus-mempool_8c-source.html#l00336
_dbus_mem_pool_dealloc()
,
dbus-mempool_8c-source.html#l00136
_dbus_mem_pool_new()
,
dbus-message_8c-source.html#l00144
_dbus_message_get_network_data()
,
dbus-message_8c-source.html#l01760
_dbus_message_iter_get_args_valist()
,
dbus-message_8c-source.html#l03206
_dbus_message_loader_get_buffer()
,
dbus-message_8c-source.html#l03533
_dbus_message_loader_get_is_corrupted()
,
dbus-message_8c-source.html#l03411
_dbus_message_loader_queue_messages()
,
dbus-message_8c-source.html#l03227
_dbus_message_loader_return_buffer()
,
dbus-message_8c-source.html#l00277
_dbus_message_lock()
,
dbus-message_8c-source.html#l00245
_dbus_message_remove_size_counter()
,
dbus-message_8c-source.html#l00162
_dbus_message_set_serial()
,
dbus-object-tree_8c-source.html#l00917
_dbus_object_tree_get_user_data_unlocked()
,
dbus-object-tree_8c-source.html#l00127
_dbus_object_tree_ref()
,
dbus-object-tree_8c-source.html#l00403
_dbus_object_tree_register()
,
dbus-object-tree_8c-source.html#l00141
_dbus_object_tree_unref()
,
dbus-object-tree_8c-source.html#l00446
_dbus_object_tree_unregister_and_unlock()
,
dbus-connection_8c-source.html#l00875
_dbus_pending_call_complete_and_unlock()
,
dbus-pending-call_8c-source.html#l00052
_dbus_pending_call_new()
,
dbus-pending-call_8c-source.html#l00111
_dbus_pending_call_notify()
,
dbus-sysdeps_8c-source.html#l00191
_dbus_read()
,
dbus-sysdeps_8c-source.html#l00823
_dbus_read_credentials_unix_socket()
,
dbus-server_8c-source.html#l00195
_dbus_server_finalize_base()
,
dbus-server_8c-source.html#l00738
_dbus_server_ref_unlocked()
,
dbus-server_8c-source.html#l00323
_dbus_server_toggle_watch()
,
dbus-server_8c-source.html#l00760
_dbus_server_unref_unlocked()
,
dbus-sysdeps_8c-source.html#l00104
_dbus_setenv()
,
dbus-string_8c-source.html#l00986
_dbus_string_append()
,
dbus-string_8c-source.html#l01253
_dbus_string_append_len()
,
dbus-string_8c-source.html#l00696
_dbus_string_copy_data()
,
dbus-string_8c-source.html#l01567
_dbus_string_copy_len()
,
dbus-string_8c-source.html#l00720
_dbus_string_copy_to_buffer()
,
dbus-string_8c-source.html#l01382
_dbus_string_delete()
,
dbus-string-util_8c-source.html#l00044
_dbus_string_ends_with_c_str()
,
dbus-string_8c-source.html#l02197
_dbus_string_equal_c_str()
,
dbus-string_8c-source.html#l02149
_dbus_string_equal_substring()
,
dbus-string_8c-source.html#l01878
_dbus_string_find_blank()
,
dbus-string-util_8c-source.html#l00088
_dbus_string_find_byte_backward()
,
dbus-string_8c-source.html#l01810
_dbus_string_find_to()
,
dbus-string_8c-source.html#l00456
_dbus_string_get_data_len()
,
dbus-sysdeps-util_8c-source.html#l00708
_dbus_string_get_dirname()
,
dbus-string_8c-source.html#l02356
_dbus_string_hex_decode()
,
dbus-string_8c-source.html#l02306
_dbus_string_hex_encode()
,
dbus-string_8c-source.html#l00208
_dbus_string_init_const()
,
dbus-string_8c-source.html#l00228
_dbus_string_init_const_len()
,
dbus-string_8c-source.html#l00130
_dbus_string_init_preallocated()
,
dbus-string_8c-source.html#l01139
_dbus_string_insert_8_aligned()
,
dbus-string_8c-source.html#l01167
_dbus_string_insert_alignment()
,
dbus-string_8c-source.html#l00580
_dbus_string_insert_byte()
,
dbus-string_8c-source.html#l00550
_dbus_string_insert_bytes()
,
dbus-string_8c-source.html#l00811
_dbus_string_lengthen()
,
dbus-string_8c-source.html#l01448
_dbus_string_move()
,
dbus-string_8c-source.html#l01500
_dbus_string_move_len()
,
dbus-string_8c-source.html#l01958
_dbus_string_pop_line()
,
dbus-string_8c-source.html#l01605
_dbus_string_replace_len()
,
dbus-string_8c-source.html#l00853
_dbus_string_set_length()
,
dbus-string_8c-source.html#l00831
_dbus_string_shorten()
,
dbus-string_8c-source.html#l01916
_dbus_string_skip_blank()
,
dbus-string-util_8c-source.html#l00123
_dbus_string_skip_white()
,
dbus-string_8c-source.html#l00607
_dbus_string_steal_data()
,
dbus-string_8c-source.html#l02497
_dbus_string_validate_ascii()
,
dbus-string_8c-source.html#l02638
_dbus_string_validate_nul()
,
dbus-string_8c-source.html#l02540
_dbus_string_validate_utf8()
,
dbus-marshal-basic_8c-source.html#l00937
_dbus_swap_array()
,
dbus-timeout_8c-source.html#l00133
_dbus_timeout_set_interval()
,
dbus-timeout_8c-source.html#l00106
_dbus_timeout_unref()
,
dbus-transport_8c-source.html#l00397
_dbus_transport_disconnect()
,
dbus-transport_8c-source.html#l00698
_dbus_transport_do_iteration()
,
dbus-transport_8c-source.html#l00438
_dbus_transport_get_is_authenticated()
,
dbus-transport_8c-source.html#l00603
_dbus_transport_handle_watch()
,
dbus-transport_8c-source.html#l00091
_dbus_transport_init_base()
,
dbus-transport_8c-source.html#l00212
_dbus_transport_open()
,
dbus-transport_8c-source.html#l00857
_dbus_transport_queue_messages()
,
dbus-transport_8c-source.html#l00355
_dbus_transport_ref()
,
dbus-transport_8c-source.html#l00641
_dbus_transport_set_connection()
,
dbus-transport_8c-source.html#l00372
_dbus_transport_unref()
,
dbus-marshal-recursive_8c-source.html#l01513
_dbus_type_reader_delete()
,
dbus-marshal-recursive_8c-source.html#l00995
_dbus_type_reader_get_array_length()
,
dbus-marshal-recursive_8c-source.html#l00881
_dbus_type_reader_get_current_type()
,
dbus-marshal-recursive_8c-source.html#l00916
_dbus_type_reader_get_element_type()
,
dbus-marshal-recursive_8c-source.html#l01548
_dbus_type_reader_greater_than()
,
dbus-marshal-recursive_8c-source.html#l00827
_dbus_type_reader_init_types_only_from_mark()
,
dbus-marshal-recursive_8c-source.html#l00965
_dbus_type_reader_read_basic()
,
dbus-marshal-recursive_8c-source.html#l01019
_dbus_type_reader_read_fixed_multi()
,
dbus-marshal-recursive_8c-source.html#l00948
_dbus_type_reader_read_raw()
,
dbus-marshal-recursive_8c-source.html#l01084
_dbus_type_reader_recurse()
,
dbus-marshal-recursive_8c-source.html#l00857
_dbus_type_reader_save_mark()
,
dbus-marshal-recursive_8c-source.html#l01456
_dbus_type_reader_set_basic()
,
dbus-marshal-recursive_8c-source.html#l00329
_dbus_type_signature_next()
,
dbus-marshal-recursive_8c-source.html#l02255
_dbus_type_writer_unrecurse()
,
dbus-marshal-recursive_8c-source.html#l02435
_dbus_type_writer_write_fixed_multi()
,
dbus-userdb_8c-source.html#l00305
_dbus_user_database_get_system()
,
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
,
dbus-userdb_8c-source.html#l00501
_dbus_user_database_unref()
,
dbus-marshal-validate_8c-source.html#l00633
_dbus_validate_body_with_reason()
,
dbus-marshal-validate_8c-source.html#l00780
_dbus_validate_interface()
,
dbus-marshal-validate_8c-source.html#l00856
_dbus_validate_member()
,
dbus-marshal-validate_8c-source.html#l00715
_dbus_validate_path()
,
dbus-marshal-validate_8c-source.html#l01012
_dbus_validate_signature()
,
dbus-marshal-validate_8c-source.html#l00054
_dbus_validate_signature_with_reason()
,
dbus-marshal-basic_8c-source.html#l01365
_dbus_verbose_bytes()
,
dbus-marshal-basic_8c-source.html#l01448
_dbus_verbose_bytes_of_string()
,
dbus-watch_8c-source.html#l00067
_dbus_watch_new()
,
dbus-watch_8c-source.html#l00117
_dbus_watch_unref()
,
dbus-sysdeps_8c-source.html#l00297
_dbus_write_two()
,
dbus-address_8c-source.html#l00146
dbus_address_entry_get_value()
,
dbus-address_8c-source.html#l00566
dbus_address_unescape_value()
,
dbus-bus_8c-source.html#l00328
dbus_bus_get()
,
dbus-bus_8c-source.html#l00511
dbus_bus_set_unique_name()
,
dbus-connection_8c-source.html#l02930
dbus_connection_borrow_message()
,
dbus-connection_8c-source.html#l01746
dbus_connection_ref()
,
dbus-connection_8c-source.html#l02975
dbus_connection_return_message()
,
dbus-connection_8c-source.html#l02753
dbus_connection_send_with_reply_and_block()
,
dbus-connection_8c-source.html#l03004
dbus_connection_steal_borrowed_message()
,
dbus-connection_8c-source.html#l01884
dbus_connection_unref()
,
dbus-errors_8c-source.html#l00260
dbus_error_has_name()
,
dbus-errors_8c-source.html#l00151
dbus_error_init()
,
dbus-errors_8c-source.html#l00287
dbus_error_is_set()
,
dbus-memory_8c-source.html#l00612
dbus_free()
,
dbus-message_8c-source.html#l01076
dbus_message_ref()
,
dbus-message_8c-source.html#l01097
dbus_message_unref()
,
dbus-address_8c-source.html#l00320
dbus_parse_address()
,
dbus-pending-call_8c-source.html#l00170
dbus_pending_call_unref()
,
dbus-server_8c-source.html#l00799
dbus_server_disconnect()
,
dbus-server_8c-source.html#l00674
dbus_server_ref()
,
dbus-server_8c-source.html#l00701
dbus_server_unref()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
dbus-errors_8c-source.html#l00201
dbus_set_error_const()
,
dbus-threads_8c-source.html#l00306
dbus_threads_init()
,
dbus-watch_8c-source.html#l00561
dbus_watch_get_enabled()
, and
dbus-watch_8c-source.html#l00506
dbus_watch_get_flags()
.
#define _dbus_assert_not_reached
(
explanation
)
Aborts with an error message if called.
The given explanation will be printed.
Parameters:
explanation
explanation of what happened if the code was reached.
Definition at line
dbus-internals_8h-source.html#l00112
112
of file
dbus-internals_8h-source.html
dbus-internals.h
.
Referenced by
dbus-sysdeps-util_8c-source.html#l00064
_dbus_become_daemon()
,
dbus-hash_8c-source.html#l00292
_dbus_hash_table_new()
,
dbus-marshal-header_8c-source.html#l01243
_dbus_header_set_field_basic()
,
dbus-marshal-basic_8c-source.html#l00503
_dbus_marshal_read_basic()
,
dbus-marshal-basic_8c-source.html#l00382
_dbus_marshal_set_basic()
,
dbus-marshal-basic_8c-source.html#l01131
_dbus_marshal_skip_basic()
,
dbus-marshal-basic_8c-source.html#l00844
_dbus_marshal_write_basic()
,
dbus-marshal-basic_8c-source.html#l01073
_dbus_marshal_write_fixed_multi()
,
dbus-mempool_8c-source.html#l00336
_dbus_mem_pool_dealloc()
,
dbus-spawn_8c-source.html#l01030
_dbus_spawn_async_with_babysitter()
,
dbus-timeout_8c-source.html#l00339
_dbus_timeout_list_remove_timeout()
,
dbus-marshal-basic_8c-source.html#l01226
_dbus_type_get_alignment()
,
dbus-marshal-recursive_8c-source.html#l01084
_dbus_type_reader_recurse()
,
dbus-marshal-recursive_8c-source.html#l02387
_dbus_type_writer_write_basic()
,
dbus-marshal-recursive_8c-source.html#l02435
_dbus_type_writer_write_fixed_multi()
,
dbus-watch_8c-source.html#l00384
_dbus_watch_list_remove_watch()
, and
dbus-connection_8c-source.html#l03435
dbus_connection_dispatch()
.
#define _DBUS_DECLARE_GLOBAL_LOCK
(
name
)
extern DBusMutex  *_dbus_lock_##name
Expands to declaration of a global lock defined with _DBUS_DEFINE_GLOBAL_LOCK.
The lock must be added to the list to initialize in
group__DBusThreads.html#ga0
dbus_threads_init()
.
Definition at line
dbus-internals_8h-source.html#l00268
268
of file
dbus-internals_8h-source.html
dbus-internals.h
.
#define _DBUS_DEFINE_GLOBAL_LOCK
(
name
)
DBusMutex         *_dbus_lock_##name
Defines a global lock variable with the given name.
The lock must be added to the list to initialize in
group__DBusThreads.html#ga0
dbus_threads_init()
.
Definition at line
dbus-internals_8h-source.html#l00269
269
of file
dbus-internals_8h-source.html
dbus-internals.h
.
#define _DBUS_INT_TO_POINTER
(
integer
)
((void*)((long)(integer)))
Safely stuffs an integer into a pointer, to be extracted later with _DBUS_POINTER_TO_INT.
Only guaranteed to preserve 32 bits.
Parameters:
integer
the integer to stuff into a pointer.
Definition at line
dbus-internals_8h-source.html#l00148
148
of file
dbus-internals_8h-source.html
dbus-internals.h
.
Referenced by
dbus-hash_8c-source.html#l01492
_dbus_hash_table_insert_int()
,
dbus-hash_8c-source.html#l01186
_dbus_hash_table_lookup_int()
,
dbus-hash_8c-source.html#l01321
_dbus_hash_table_remove_int()
, and
dbus-marshal-validate_8c-source.html#l00054
_dbus_validate_signature_with_reason()
.
#define _DBUS_MAX_SUN_PATH_LENGTH   99
Maximum length of the path to a UNIX domain socket, sockaddr_un::sun_path member.
POSIX requires that all systems support at least 100 bytes here, including the nul termination. We use 99 for the max value to allow for the nul.
We could probably also do sizeof (addr.sun_path) but this way we are the same on all platforms which is probably a good idea.
Referenced by
dbus-sysdeps_8c-source.html#l00394
_dbus_connect_unix_socket()
, and
dbus-sysdeps_8c-source.html#l00484
_dbus_listen_unix_socket()
.
#define _DBUS_N_ELEMENTS
(
array
)
((int) (sizeof ((array)) / sizeof ((array)[0])))
Computes the number of elements in a fixed-size array using sizeof().
Parameters:
array
the array to count elements in.
Definition at line
dbus-internals_8h-source.html#l00145
145
of file
dbus-internals_8h-source.html
dbus-internals.h
.
Referenced by
dbus-hash_8c-source.html#l00292
_dbus_hash_table_new()
.
#define _DBUS_POINTER_TO_INT
(
pointer
)
((long)(pointer))
Safely casts a void* to an integer; should only be used on void* that actually contain integers, for example one created with _DBUS_INT_TO_POINTER.
Only guaranteed to preserve 32 bits. (i.e. it's used to store 32-bit ints in pointers, but can't be used to store 64-bit pointers in ints.)
Parameters:
pointer
pointer to extract an integer from.
Definition at line
dbus-internals_8h-source.html#l00147
147
of file
dbus-internals_8h-source.html
dbus-internals.h
.
Referenced by
dbus-hash_8c-source.html#l00656
_dbus_hash_iter_get_int_key()
, and
dbus-marshal-validate_8c-source.html#l00054
_dbus_validate_signature_with_reason()
.
#define _DBUS_ZERO
(
object
)
(memset (&(object), '\0', sizeof ((object))))
Sets all bits in an object to zero.
Parameters:
object
the object to be zeroed.
Definition at line
dbus-internals_8h-source.html#l00150
150
of file
dbus-internals_8h-source.html
dbus-internals.h
.
Referenced by
dbus-sysdeps_8c-source.html#l00594
_dbus_connect_tcp_socket()
,
dbus-sysdeps_8c-source.html#l00394
_dbus_connect_unix_socket()
,
dbus-sysdeps_8c-source.html#l00673
_dbus_listen_tcp_socket()
, and
dbus-sysdeps_8c-source.html#l00484
_dbus_listen_unix_socket()
.
Enumeration Type Documentation
enum
group__DBusInternalsUtils.html#ga159
ReadStatus
Enumeration for status of a read().
Enumerator:
READ_STATUS_OK
Read succeeded.
READ_STATUS_ERROR
Some kind of error.
READ_STATUS_EOF
EOF returned.
Definition at line
dbus-spawn_8c-source.html#l00050
50
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
Function Documentation
int _dbus_accept
(
int
listen_fd
)
Accepts a connection on a listening socket.
Handles EINTR for you.
Parameters:
listen_fd
the listen file descriptor
Returns:
the connection fd of the client, or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00979
979
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
group__DBusTypes.html#ga4
dbus_int32_t
_dbus_atomic_dec
(
structDBusAtomic.html
DBusAtomic
*
atomic
)
Atomically decrement an integer.
Parameters:
atomic
pointer to the integer to decrement
Returns:
the value before decrementing
todo.html#_todo000079
Todo:
implement arch-specific faster atomic ops
Definition at line
dbus-sysdeps_8c-source.html#l01832
1832
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00270
_DBUS_LOCK
,
dbus-internals_8h-source.html#l00271
_DBUS_UNLOCK
, and
dbus-sysdeps_8h-source.html#l00192
DBusAtomic::value
.
Referenced by
dbus-connection_8c-source.html#l01282
_dbus_connection_unref_unlocked()
,
dbus-server_8c-source.html#l00760
_dbus_server_unref_unlocked()
,
dbus-connection_8c-source.html#l01884
dbus_connection_unref()
,
dbus-message_8c-source.html#l01097
dbus_message_unref()
,
dbus-pending-call_8c-source.html#l00170
dbus_pending_call_unref()
, and
dbus-server_8c-source.html#l00701
dbus_server_unref()
.
group__DBusTypes.html#ga4
dbus_int32_t
_dbus_atomic_inc
(
structDBusAtomic.html
DBusAtomic
*
atomic
)
Atomically increments an integer.
Parameters:
atomic
pointer to the integer to increment
Returns:
the value before incrementing
todo.html#_todo000078
Todo:
implement arch-specific faster atomic ops
Definition at line
dbus-sysdeps_8c-source.html#l01809
1809
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00270
_DBUS_LOCK
,
dbus-internals_8h-source.html#l00271
_DBUS_UNLOCK
, and
dbus-sysdeps_8h-source.html#l00192
DBusAtomic::value
.
Referenced by
dbus-connection_8c-source.html#l01258
_dbus_connection_ref_unlocked()
,
dbus-server_8c-source.html#l00738
_dbus_server_ref_unlocked()
,
dbus-connection_8c-source.html#l01746
dbus_connection_ref()
,
dbus-message_8c-source.html#l01076
dbus_message_ref()
,
dbus-pending-call_8c-source.html#l00154
dbus_pending_call_ref()
, and
dbus-server_8c-source.html#l00674
dbus_server_ref()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_babysitter_get_child_exited
(
structDBusBabysitter.html
DBusBabysitter
*
sitter
)
Checks whether the child has exited, without blocking.
Parameters:
sitter
the babysitter
Definition at line
dbus-spawn_8c-source.html#l00611
611
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
group__DBusMacros.html#ga3
FALSE
, and
dbus-spawn_8c-source.html#l00580
LIVE_CHILDREN
.
Referenced by
dbus-spawn_8c-source.html#l00633
_dbus_babysitter_set_child_exit_error()
.
void _dbus_babysitter_kill_child
(
structDBusBabysitter.html
DBusBabysitter
*
sitter
)
Blocks until the babysitter process gives us the PID of the spawned grandchild, then kills the spawned grandchild.
Parameters:
sitter
the babysitter object
Definition at line
dbus-spawn_8c-source.html#l00589
589
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
dbus-spawn_8c-source.html#l00580
LIVE_CHILDREN
, and
group__DBusMacros.html#ga2
TRUE
.
structDBusBabysitter.html
DBusBabysitter
* _dbus_babysitter_ref
(
structDBusBabysitter.html
DBusBabysitter
*
sitter
)
Increment the reference count on the babysitter object.
Parameters:
sitter
the babysitter
Returns:
the babysitter
Definition at line
dbus-spawn_8c-source.html#l00243
243
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
group__DBusMacros.html#ga4
NULL
, and
dbus-spawn_8c-source.html#l00186
DBusBabysitter::refcount
.
void _dbus_babysitter_set_child_exit_error
(
structDBusBabysitter.html
DBusBabysitter
*
sitter
,
structDBusError.html
DBusError
*
error
)
Sets the
structDBusError.html
DBusError
with an explanation of why the spawned child process exited (on a signal, or whatever).
If the child process has not exited, does nothing (error will remain unset).
Parameters:
sitter
the babysitter
error
an error to fill in
Definition at line
dbus-spawn_8c-source.html#l00633
633
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
dbus-spawn_8c-source.html#l00611
_dbus_babysitter_get_child_exited()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
, and
dbus-errors_8c-source.html#l00313
dbus_set_error()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_babysitter_set_watch_functions
(
structDBusBabysitter.html
DBusBabysitter
*
sitter
,
DBusAddWatchFunction
add_function
,
DBusRemoveWatchFunction
remove_function
,
DBusWatchToggledFunction
toggled_function
,
void *
data
,
group__DBusMemory.html#ga8
DBusFreeFunction
free_data_function
)
Sets watch functions to notify us when the babysitter object needs to read/write file descriptors.
Parameters:
sitter
the babysitter
add_function
function to begin monitoring a new descriptor.
remove_function
function to stop monitoring a descriptor.
toggled_function
function to notify when the watch is enabled/disabled
data
data to pass to add_function and remove_function.
free_data_function
function to be called to free the data.
Returns:
group__DBusMacros.html#ga3
FALSE
on failure (no memory)
Definition at line
dbus-spawn_8c-source.html#l00691
691
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
dbus-watch_8c-source.html#l00253
_dbus_watch_list_set_functions()
, and
dbus-spawn_8c-source.html#l00196
DBusBabysitter::watches
.
void _dbus_babysitter_unref
(
structDBusBabysitter.html
DBusBabysitter
*
sitter
)
Decrement the reference count on the babysitter object.
When the reference count of the babysitter object reaches zero, the babysitter is killed and the child that was being babysat gets emancipated.
Parameters:
sitter
the babysitter
Definition at line
dbus-spawn_8c-source.html#l00262
262
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-watch_8c-source.html#l00145
_dbus_watch_invalidate()
,
dbus-watch_8c-source.html#l00225
_dbus_watch_list_free()
,
dbus-watch_8c-source.html#l00117
_dbus_watch_unref()
,
dbus-memory_8c-source.html#l00612
dbus_free()
,
dbus-spawn_8c-source.html#l00191
DBusBabysitter::error_pipe_from_child
,
dbus-spawn_8c-source.html#l00198
DBusBabysitter::error_watch
,
dbus-spawn_8c-source.html#l00188
DBusBabysitter::executable
,
group__DBusMacros.html#ga4
NULL
,
dbus-spawn_8c-source.html#l00186
DBusBabysitter::refcount
,
dbus-spawn_8c-source.html#l00193
DBusBabysitter::sitter_pid
,
dbus-spawn_8c-source.html#l00199
DBusBabysitter::sitter_watch
,
dbus-spawn_8c-source.html#l00190
DBusBabysitter::socket_to_babysitter
,
dbus-spawn_8c-source.html#l00202
DBusBabysitter::status
, and
dbus-spawn_8c-source.html#l00196
DBusBabysitter::watches
.
Referenced by
dbus-spawn_8c-source.html#l01030
_dbus_spawn_async_with_babysitter()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_become_daemon
(
const
structDBusString.html
DBusString
*
pidfile
,
int
print_pid_fd
,
structDBusError.html
DBusError
*
error
)
Does the chdir, fork, setsid, etc.
to become a daemon process.
Parameters:
pidfile
group__DBusMacros.html#ga4
NULL
, or pidfile to create
print_pid_fd
file descriptor to print daemon's pid to, or -1 for none
error
return location for errors
Returns:
group__DBusMacros.html#ga3
FALSE
on failure
Definition at line
dbus-sysdeps-util_8c-source.html#l00064
64
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-internals_8h-source.html#l00112
_dbus_assert_not_reached
,
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l00172
_dbus_getenv()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-string_8c-source.html#l00986
_dbus_string_append()
,
dbus-sysdeps_8c-source.html#l01014
_dbus_string_append_int()
,
dbus-string_8c-source.html#l00261
_dbus_string_free()
,
dbus-string_8c-source.html#l00174
_dbus_string_init()
,
dbus-sysdeps_8c-source.html#l00251
_dbus_write()
,
dbus-sysdeps-util_8c-source.html#l00189
_dbus_write_pid_file()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_change_identity
(
dbus_uid_t
uid
,
dbus_gid_t
gid
,
structDBusError.html
DBusError
*
error
)
Changes the user and group the bus is running as.
Parameters:
uid
the new user ID
gid
the new group ID
error
return location for errors
Returns:
group__DBusMacros.html#ga3
FALSE
on failure
Definition at line
dbus-sysdeps-util_8c-source.html#l00246
246
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_close
(
int
fd
,
structDBusError.html
DBusError
*
error
)
Closes a file descriptor.
Parameters:
fd
the file descriptor
error
error object
Returns:
group__DBusMacros.html#ga3
FALSE
if error set
Definition at line
dbus-sysdeps_8c-source.html#l02718
2718
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-server-unix_8c-source.html#l00315
_dbus_server_new_for_domain_socket()
,
dbus-transport-unix_8c-source.html#l01192
_dbus_transport_new_for_domain_socket()
, and
dbus-transport-unix_8c-source.html#l01259
_dbus_transport_new_for_tcp_socket()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_concat_dir_and_file
(
structDBusString.html
DBusString
*
dir
,
const
structDBusString.html
DBusString
*
next_component
)
Appends the given filename to the given directory.
todo.html#_todo000080
Todo:
it might be cute to collapse multiple '/' such as "foo//" concat "//bar"
Parameters:
dir
the directory name
next_component
the filename
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-sysdeps_8c-source.html#l02363
2363
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-string_8c-source.html#l01273
_dbus_string_append_byte()
,
dbus-string_8c-source.html#l01472
_dbus_string_copy()
,
dbus-string_8c-source.html#l00831
_dbus_string_shorten()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
, and
dbus-server_8c-source.html#l00486
dbus_server_listen()
.
int _dbus_connect_tcp_socket
(
const char *
host
,
group__DBusTypes.html#ga3
dbus_uint32_t
port
,
structDBusError.html
DBusError
*
error
)
Creates a socket and connects to a socket at the given host and port.
The connection fd is returned, and is set up as nonblocking.
Parameters:
host
the host name to connect to
port
the prot to connect to
error
return location for error code
Returns:
connection file descriptor or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00594
594
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-internals_8h-source.html#l00150
_DBUS_ZERO
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-transport-unix_8c-source.html#l01259
_dbus_transport_new_for_tcp_socket()
.
int _dbus_connect_unix_socket
(
const char *
path
,
group__DBusTypes.html#ga2
dbus_bool_t
abstract
,
structDBusError.html
DBusError
*
error
)
Creates a socket and connects it to the UNIX domain socket at the given path.
The connection fd is returned, and is set up as nonblocking.
Uses abstract sockets instead of filesystem-linked sockets if requested (it's possible only on Linux; see "man 7 unix" on Linux). On non-Linux abstract socket usage always fails.
Parameters:
path
the path to UNIX domain socket
abstract
group__DBusMacros.html#ga2
TRUE
to use abstract namespace
error
return location for error code
Returns:
connection file descriptor or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00394
394
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
group__DBusInternalsUtils.html#ga153
_DBUS_MAX_SUN_PATH_LENGTH
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-internals_8h-source.html#l00150
_DBUS_ZERO
, and
dbus-errors_8c-source.html#l00313
dbus_set_error()
.
Referenced by
dbus-transport-unix_8c-source.html#l01192
_dbus_transport_new_for_domain_socket()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_create_directory
(
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Creates a directory; succeeds if the directory is created or already existed.
Parameters:
filename
directory filename
error
initialized error object
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-sysdeps_8c-source.html#l02329
2329
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_create_file_exclusively
(
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Creates the given file, failing if the file already exists.
Parameters:
filename
the filename
error
error location
Returns:
group__DBusMacros.html#ga2
TRUE
if we created the file and it didn't exist
Definition at line
dbus-sysdeps_8c-source.html#l02256
2256
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
void _dbus_credentials_clear
(
structDBusCredentials.html
DBusCredentials
*
credentials
)
Sets fields in
structDBusCredentials.html
DBusCredentials
to DBUS_PID_UNSET, DBUS_UID_UNSET, DBUS_GID_UNSET.
Parameters:
credentials
the credentials object to fill in
Definition at line
dbus-sysdeps_8c-source.html#l01700
1700
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8h-source.html#l00109
DBusCredentials::gid
,
dbus-sysdeps_8h-source.html#l00107
DBusCredentials::pid
, and
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
.
Referenced by
dbus-auth_8c-source.html#l02452
_dbus_auth_get_identity()
, and
dbus-sysdeps_8c-source.html#l00823
_dbus_read_credentials_unix_socket()
.
void _dbus_credentials_from_current_process
(
structDBusCredentials.html
DBusCredentials
*
credentials
)
Gets the credentials of the current process.
Parameters:
credentials
credentials to fill in.
Definition at line
dbus-sysdeps_8c-source.html#l01713
1713
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-sysdeps_8h-source.html#l00109
DBusCredentials::gid
,
dbus-sysdeps_8h-source.html#l00107
DBusCredentials::pid
, and
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
.
Referenced by
dbus-transport_8c-source.html#l00438
_dbus_transport_get_is_authenticated()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_credentials_from_uid
(
dbus_uid_t
uid
,
structDBusCredentials.html
DBusCredentials
*
credentials
)
Gets the credentials corresponding to the given UID.
Parameters:
uid
the UID
credentials
credentials to fill in
Returns:
group__DBusMacros.html#ga2
TRUE
if the UID existed and we got some credentials
Definition at line
dbus-userdb-util_8c-source.html#l00085
85
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-userdb_8c-source.html#l00305
_dbus_user_database_get_system()
,
dbus-userdb_8c-source.html#l00535
_dbus_user_database_get_uid()
,
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00109
DBusCredentials::gid
,
group__DBusMacros.html#ga4
NULL
,
dbus-sysdeps_8h-source.html#l00107
DBusCredentials::pid
,
dbus-sysdeps_8h-source.html#l00148
DBusUserInfo::primary_gid
,
group__DBusMacros.html#ga2
TRUE
,
dbus-sysdeps_8h-source.html#l00147
DBusUserInfo::uid
, and
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_credentials_from_username
(
const
structDBusString.html
DBusString
*
username
,
structDBusCredentials.html
DBusCredentials
*
credentials
)
Gets the credentials corresponding to the given username.
Parameters:
username
the username
credentials
credentials to fill in
Returns:
group__DBusMacros.html#ga2
TRUE
if the username existed and we got some credentials
Definition at line
dbus-userdb_8c-source.html#l00405
405
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-userdb_8c-source.html#l00305
_dbus_user_database_get_system()
,
dbus-userdb_8c-source.html#l00554
_dbus_user_database_get_username()
,
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00109
DBusCredentials::gid
,
group__DBusMacros.html#ga4
NULL
,
dbus-sysdeps_8h-source.html#l00107
DBusCredentials::pid
,
dbus-sysdeps_8h-source.html#l00148
DBusUserInfo::primary_gid
,
group__DBusMacros.html#ga2
TRUE
,
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
, and
dbus-sysdeps_8h-source.html#l00147
DBusUserInfo::uid
.
Referenced by
dbus-userdb-util_8c-source.html#l00125
_dbus_get_user_id()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_credentials_match
(
const
structDBusCredentials.html
DBusCredentials
*
expected_credentials
,
const
structDBusCredentials.html
DBusCredentials
*
provided_credentials
)
Checks whether the provided_credentials are allowed to log in as the expected_credentials.
Parameters:
expected_credentials
credentials we're trying to log in as
provided_credentials
credentials we have
Returns:
group__DBusMacros.html#ga2
TRUE
if we can log in
Definition at line
dbus-sysdeps_8c-source.html#l01737
1737
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga2
TRUE
, and
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
.
Referenced by
dbus-transport_8c-source.html#l00438
_dbus_transport_get_is_authenticated()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_delete_directory
(
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Removes a directory; Directory must be empty.
Parameters:
filename
directory filename
error
initialized error object
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-sysdeps-util_8c-source.html#l00310
310
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_delete_file
(
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Deletes the given file.
Parameters:
filename
the filename
error
error location
Returns:
group__DBusMacros.html#ga2
TRUE
if unlink() succeeded
Definition at line
dbus-sysdeps_8c-source.html#l02300
2300
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_directory_get_next_file
(
structDBusDirIter.html
DBusDirIter
*
iter
,
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Get next file in the directory.
Will not return "." or ".." on UNIX. If an error occurs, the contents of "filename" are undefined. The error is never set if the function succeeds.
todo.html#_todo000076
Todo:
for thread safety, I think we have to use readdir_r().
(GLib has the same issue, should file a bug.)
Parameters:
iter
the iterator
filename
string to be set to the next file in the dir
error
return location for error
Returns:
group__DBusMacros.html#ga2
TRUE
if filename was filled in with a new filename
Definition at line
dbus-sysdeps-util_8c-source.html#l00504
504
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-string_8c-source.html#l00986
_dbus_string_append()
,
dbus-string_8c-source.html#l00853
_dbus_string_set_length()
,
dbus-sysdeps-util_8c-source.html#l00444
DBusDirIter::d
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
structDBusDirIter.html
DBusDirIter
* _dbus_directory_open
(
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Open a directory to iterate over.
Parameters:
filename
the directory name
error
exception return object or
group__DBusMacros.html#ga4
NULL
Returns:
new iterator, or
group__DBusMacros.html#ga4
NULL
on error
Definition at line
dbus-sysdeps-util_8c-source.html#l00456
456
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-sysdeps-util_8c-source.html#l00444
DBusDirIter::d
,
dbus-memory_8h-source.html#l00042
dbus_new0
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
, and
group__DBusMacros.html#ga4
NULL
.
char** _dbus_dup_string_array
(
const char **
array
)
Duplicates a string array.
Result may be freed with
group__DBusMemory.html#ga4
dbus_free_string_array()
. Returns
group__DBusMacros.html#ga4
NULL
if memory allocation fails. If the array to be duplicated is
group__DBusMacros.html#ga4
NULL
, returns
group__DBusMacros.html#ga4
NULL
.
Parameters:
array
array to duplicate.
Returns:
newly-allocated copy.
Definition at line
dbus-internals_8c-source.html#l00354
354
of file
dbus-internals_8c-source.html
dbus-internals.c
.
References
dbus-internals_8c-source.html#l00303
_dbus_strdup()
,
dbus-memory_8c-source.html#l00650
dbus_free_string_array()
,
dbus-memory_8h-source.html#l00042
dbus_new0
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-auth_8c-source.html#l02120
_dbus_auth_set_mechanisms()
, and
dbus-server_8c-source.html#l01015
dbus_server_set_auth_mechanisms()
.
const char* _dbus_error_from_errno
(
int
error_number
)
Converts a UNIX errno into a
structDBusError.html
DBusError
name.
todo.html#_todo000081
Todo:
should cover more errnos, specifically those from open().
Parameters:
error_number
the errno.
Returns:
an error name
Definition at line
dbus-sysdeps_8c-source.html#l02611
2611
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
Referenced by
dbus-sysdeps-util_8c-source.html#l00064
_dbus_become_daemon()
,
dbus-sysdeps-util_8c-source.html#l00246
_dbus_change_identity()
,
dbus-sysdeps_8c-source.html#l01168
_dbus_check_dir_is_private_to_user()
,
dbus-sysdeps_8c-source.html#l02718
_dbus_close()
,
dbus-sysdeps_8c-source.html#l00594
_dbus_connect_tcp_socket()
,
dbus-sysdeps_8c-source.html#l00394
_dbus_connect_unix_socket()
,
dbus-sysdeps-util_8c-source.html#l00504
_dbus_directory_get_next_file()
,
dbus-sysdeps-util_8c-source.html#l00456
_dbus_directory_open()
,
dbus-sysdeps_8c-source.html#l02014
_dbus_file_get_contents()
,
dbus-sysdeps_8c-source.html#l02867
_dbus_full_duplex_pipe()
,
dbus-sysdeps_8c-source.html#l00673
_dbus_listen_tcp_socket()
,
dbus-sysdeps_8c-source.html#l00484
_dbus_listen_unix_socket()
,
dbus-sysdeps_8c-source.html#l00823
_dbus_read_credentials_unix_socket()
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-sysdeps-util_8c-source.html#l00408
_dbus_stat()
,
dbus-sysdeps_8c-source.html#l02120
_dbus_string_save_to_file()
, and
dbus-sysdeps-util_8c-source.html#l00189
_dbus_write_pid_file()
.
void _dbus_exit
(
int
code
)
Exit the process, returning the given value.
Parameters:
code
the exit code
Definition at line
dbus-sysdeps_8c-source.html#l02705
2705
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
Referenced by
dbus-connection_8c-source.html#l03435
dbus_connection_dispatch()
.
void _dbus_fd_set_close_on_exec
(
int
fd
)
Sets the file descriptor to be close on exec.
Should be called for all file descriptors in D-BUS code.
Parameters:
fd
the file descriptor
Definition at line
dbus-sysdeps_8c-source.html#l02587
2587
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
Referenced by
dbus-server-unix_8c-source.html#l00315
_dbus_server_new_for_domain_socket()
,
dbus-server-unix_8c-source.html#l00395
_dbus_server_new_for_tcp_socket()
,
dbus-spawn_8c-source.html#l01030
_dbus_spawn_async_with_babysitter()
,
dbus-transport-unix_8c-source.html#l01192
_dbus_transport_new_for_domain_socket()
, and
dbus-transport-unix_8c-source.html#l01259
_dbus_transport_new_for_tcp_socket()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_file_exists
(
const char *
file
)
Checks if a file exists.
Parameters:
file
full path to the file
Returns:
group__DBusMacros.html#ga2
TRUE
if file exists
Definition at line
dbus-sysdeps-util_8c-source.html#l00336
336
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
Referenced by
dbus-sysdeps-util_8c-source.html#l00348
_dbus_user_at_console()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_file_get_contents
(
structDBusString.html
DBusString
*
str
,
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Appends the contents of the given file to the string, returning error code.
At the moment, won't open a file more than a megabyte in size.
Parameters:
str
the string to append to
filename
filename to load
error
place to set an error
Returns:
group__DBusMacros.html#ga3
FALSE
if error was set
Definition at line
dbus-sysdeps_8c-source.html#l02014
2014
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l00191
_dbus_read()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-string_8c-source.html#l00853
_dbus_string_set_length()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_full_duplex_pipe
(
int *
fd1
,
int *
fd2
,
group__DBusTypes.html#ga2
dbus_bool_t
blocking
,
structDBusError.html
DBusError
*
error
)
Creates a full-duplex pipe (as in socketpair()).
Sets both ends of the pipe nonblocking.
todo.html#_todo000082
Todo:
libdbus only uses this for the debug-pipe server, so in principle it could be in dbus-sysdeps-util.c, except that dbus-sysdeps-util.c isn't in libdbus when tests are enabled and the debug-pipe server is used.
Parameters:
fd1
return location for one end
fd2
return location for the other end
blocking
group__DBusMacros.html#ga2
TRUE
if pipe should be blocking
error
error return
Returns:
group__DBusMacros.html#ga3
FALSE
on failure (if error is set)
Definition at line
dbus-sysdeps_8c-source.html#l02867
2867
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-spawn_8c-source.html#l01030
_dbus_spawn_async_with_babysitter()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_generate_random_ascii
(
structDBusString.html
DBusString
*
str
,
int
n_bytes
)
Generates the given number of random bytes, where the bytes are chosen from the alphanumeric ASCII subset.
Parameters:
str
the string
n_bytes
the number of random ASCII bytes to append to string
Returns:
group__DBusMacros.html#ga2
TRUE
on success,
group__DBusMacros.html#ga3
FALSE
if no memory or other failure
Definition at line
dbus-sysdeps_8c-source.html#l02523
2523
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-sysdeps_8c-source.html#l02479
_dbus_generate_random_bytes()
,
dbus-string_8c-source.html#l02497
_dbus_string_validate_ascii()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-sysdeps_8c-source.html#l02120
_dbus_string_save_to_file()
, and
dbus-server_8c-source.html#l00486
dbus_server_listen()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_generate_random_bytes
(
structDBusString.html
DBusString
*
str
,
int
n_bytes
)
Generates the given number of random bytes, using the best mechanism we can come up with.
Parameters:
str
the string
n_bytes
the number of random bytes to append to string
Returns:
group__DBusMacros.html#ga2
TRUE
on success,
group__DBusMacros.html#ga3
FALSE
if no memory
Definition at line
dbus-sysdeps_8c-source.html#l02479
2479
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l00191
_dbus_read()
,
dbus-string_8c-source.html#l00853
_dbus_string_set_length()
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-sysdeps_8c-source.html#l02523
_dbus_generate_random_ascii()
, and
dbus-sysdeps_8c-source.html#l02447
_dbus_generate_random_bytes_buffer()
.
void _dbus_generate_random_bytes_buffer
(
char *
buffer
,
int
n_bytes
)
Fills n_bytes of the given buffer with random bytes.
Parameters:
buffer
an allocated buffer
n_bytes
the number of bytes in buffer to write to
Definition at line
dbus-sysdeps_8c-source.html#l02447
2447
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02479
_dbus_generate_random_bytes()
,
dbus-string_8c-source.html#l00720
_dbus_string_copy_to_buffer()
,
dbus-string_8c-source.html#l00261
_dbus_string_free()
, and
dbus-string_8c-source.html#l00174
_dbus_string_init()
.
void _dbus_get_current_time
(
long *
tv_sec
,
long *
tv_usec
)
Get current time, as in gettimeofday().
Parameters:
tv_sec
return location for number of seconds
tv_usec
return location for number of microseconds (thousandths)
Definition at line
dbus-sysdeps_8c-source.html#l01990
1990
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-connection_8c-source.html#l02571
_dbus_connection_block_pending_call()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_get_group_id
(
const
structDBusString.html
DBusString
*
groupname
,
dbus_gid_t *
gid
)
Gets group ID given groupname.
Parameters:
groupname
the groupname
gid
return location for GID
Returns:
group__DBusMacros.html#ga2
TRUE
if group name existed and we got the GID
Definition at line
dbus-userdb-util_8c-source.html#l00149
149
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-userdb-util_8c-source.html#l00291
_dbus_user_database_get_groupname()
,
dbus-userdb_8c-source.html#l00305
_dbus_user_database_get_system()
,
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00160
DBusGroupInfo::gid
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_get_user_id
(
const
structDBusString.html
DBusString
*
username
,
dbus_uid_t *
uid
)
Gets user ID given username.
Parameters:
username
the username
uid
return location for UID
Returns:
group__DBusMacros.html#ga2
TRUE
if username existed and we got the UID
Definition at line
dbus-userdb-util_8c-source.html#l00125
125
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-userdb_8c-source.html#l00405
_dbus_credentials_from_username()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga2
TRUE
, and
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
.
const char* _dbus_getenv
(
const char *
varname
)
Wrapper for getenv().
Parameters:
varname
name of environment variable
Returns:
value of environment variable or
group__DBusMacros.html#ga4
NULL
if unset
Definition at line
dbus-sysdeps_8c-source.html#l00172
172
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
Referenced by
dbus-sysdeps-util_8c-source.html#l00064
_dbus_become_daemon()
, and
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
.
unsigned long _dbus_getpid
(
void
)
Gets our process ID.
Returns:
process ID
Definition at line
dbus-sysdeps_8c-source.html#l01757
1757
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
dbus_uid_t _dbus_getuid
(
void
)
Gets our UID.
Returns:
process UID
Definition at line
dbus-sysdeps_8c-source.html#l01766
1766
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_group_info_fill
(
structDBusGroupInfo.html
DBusGroupInfo
*
info
,
const
structDBusString.html
DBusString
*
groupname
,
structDBusError.html
DBusError
*
error
)
Initializes the given
structDBusGroupInfo.html
DBusGroupInfo
struct with information about the given group name.
Parameters:
info
the group info struct
groupname
name of group
error
the error return
Returns:
group__DBusMacros.html#ga3
FALSE
if error is set
Definition at line
dbus-sysdeps-util_8c-source.html#l00657
657
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
Referenced by
dbus-userdb-util_8c-source.html#l00189
_dbus_user_database_lookup_group()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_group_info_fill_gid
(
structDBusGroupInfo.html
DBusGroupInfo
*
info
,
dbus_gid_t
gid
,
structDBusError.html
DBusError
*
error
)
Initializes the given
structDBusGroupInfo.html
DBusGroupInfo
struct with information about the given group ID.
Parameters:
info
the group info struct
gid
group ID
error
the error return
Returns:
group__DBusMacros.html#ga3
FALSE
if error is set
Definition at line
dbus-sysdeps-util_8c-source.html#l00676
676
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb-util_8c-source.html#l00189
_dbus_user_database_lookup_group()
.
void _dbus_group_info_free
(
structDBusGroupInfo.html
DBusGroupInfo
*
info
)
Frees the members of info (but not info itself).
Parameters:
info
the group info
Definition at line
dbus-sysdeps-util_8c-source.html#l00689
689
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-memory_8c-source.html#l00612
dbus_free()
, and
dbus-sysdeps_8h-source.html#l00161
DBusGroupInfo::groupname
.
void _dbus_group_info_free_allocated
(
structDBusGroupInfo.html
DBusGroupInfo
*
info
)
Frees the given
structDBusGroupInfo.html
DBusGroupInfo
's members with
group__DBusInternalsUtils.html#ga55
_dbus_group_info_free()
and also calls
group__DBusMemory.html#ga3
dbus_free()
on the block itself.
Parameters:
info
the info
Definition at line
dbus-userdb_8c-source.html#l00059
59
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-memory_8c-source.html#l00612
dbus_free()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb-util_8c-source.html#l00189
_dbus_user_database_lookup_group()
, and
dbus-userdb_8c-source.html#l00440
_dbus_user_database_new()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_homedir_from_current_process
(
const
structDBusString.html
DBusString
**
homedir
)
Gets homedir of user owning current process.
The returned string is valid until
group__DBusMemory.html#ga5
dbus_shutdown()
is called.
Parameters:
homedir
place to store pointer to homedir
Returns:
group__DBusMacros.html#ga3
FALSE
if no memory
Definition at line
dbus-userdb_8c-source.html#l00344
344
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_homedir_from_username
(
const
structDBusString.html
DBusString
*
username
,
structDBusString.html
DBusString
*
homedir
)
Gets the home directory for the given user.
Parameters:
username
the username
homedir
string to append home directory to
Returns:
group__DBusMacros.html#ga2
TRUE
if user existed and we appended their homedir
Definition at line
dbus-userdb_8c-source.html#l00366
366
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-string_8c-source.html#l00986
_dbus_string_append()
,
dbus-userdb_8c-source.html#l00305
_dbus_user_database_get_system()
,
dbus-userdb_8c-source.html#l00554
_dbus_user_database_get_username()
,
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00152
DBusUserInfo::homedir
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_is_a_number
(
const
structDBusString.html
DBusString
*
str
,
unsigned long *
num
)
Checks if a given string is actually a number and converts it if it is.
Parameters:
str
the string to check
num
the memory location of the unsigned long to fill in
Returns:
TRUE if str is a number and num is filled in
Definition at line
dbus-userdb_8c-source.html#l00077
77
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-sysdeps_8c-source.html#l01134
_dbus_string_parse_int()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
, and
dbus-userdb-util_8c-source.html#l00189
_dbus_user_database_lookup_group()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_is_console_user
(
dbus_uid_t
uid
,
structDBusError.html
DBusError
*
error
)
Checks to see if the UID sent in is the console user.
Parameters:
uid
UID of person to check
error
return location for errors
Returns:
group__DBusMacros.html#ga2
TRUE
if the UID is the same as the console user and there are no errors
Definition at line
dbus-userdb-util_8c-source.html#l00043
43
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-sysdeps-util_8c-source.html#l00348
_dbus_user_at_console()
,
dbus-userdb_8c-source.html#l00305
_dbus_user_database_get_system()
,
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
dbus-sysdeps_8h-source.html#l00151
DBusUserInfo::username
.
int _dbus_listen_tcp_socket
(
const char *
host
,
group__DBusTypes.html#ga3
dbus_uint32_t
port
,
structDBusError.html
DBusError
*
error
)
Creates a socket and binds it to the given path, then listens on the socket.
The socket is set to be nonblocking.
Parameters:
host
the host name to listen on
port
the prot to listen on
error
return location for errors
Returns:
the listening file descriptor or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00673
673
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-internals_8h-source.html#l00150
_DBUS_ZERO
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-server-unix_8c-source.html#l00395
_dbus_server_new_for_tcp_socket()
.
int _dbus_listen_unix_socket
(
const char *
path
,
group__DBusTypes.html#ga2
dbus_bool_t
abstract
,
structDBusError.html
DBusError
*
error
)
Creates a socket and binds it to the given path, then listens on the socket.
The socket is set to be nonblocking.
Uses abstract sockets instead of filesystem-linked sockets if requested (it's possible only on Linux; see "man 7 unix" on Linux). On non-Linux abstract socket usage always fails.
Parameters:
path
the socket name
abstract
group__DBusMacros.html#ga2
TRUE
to use abstract namespace
error
return location for errors
Returns:
the listening file descriptor or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00484
484
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
group__DBusInternalsUtils.html#ga153
_DBUS_MAX_SUN_PATH_LENGTH
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-internals_8h-source.html#l00150
_DBUS_ZERO
, and
dbus-errors_8c-source.html#l00313
dbus_set_error()
.
Referenced by
dbus-server-unix_8c-source.html#l00315
_dbus_server_new_for_domain_socket()
.
void* _dbus_memdup
(
const void *
mem
,
size_t
n_bytes
)
Duplicates a block of memory.
Returns
group__DBusMacros.html#ga4
NULL
on failure.
Parameters:
mem
memory to copy
n_bytes
number of bytes to copy
Returns:
the copy
Definition at line
dbus-internals_8c-source.html#l00331
331
of file
dbus-internals_8c-source.html
dbus-internals.c
.
References
dbus-memory_8c-source.html#l00437
dbus_malloc()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-object-tree_8c-source.html#l01081
_dbus_decompose_path()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_parse_uid
(
const
structDBusString.html
DBusString
*
uid_str
,
dbus_uid_t *
uid
)
Gets a UID from a UID string.
Parameters:
uid_str
the UID in string form
uid
UID to fill in
Returns:
group__DBusMacros.html#ga2
TRUE
if successfully filled in UID
Definition at line
dbus-sysdeps_8c-source.html#l02819
2819
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l01134
_dbus_string_parse_int()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_path_is_absolute
(
const
structDBusString.html
DBusString
*
filename
)
Checks whether the filename is an absolute path.
Parameters:
filename
the filename
Returns:
group__DBusMacros.html#ga2
TRUE
if an absolute path
Definition at line
dbus-sysdeps-util_8c-source.html#l00391
391
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
group__DBusMacros.html#ga3
FALSE
.
int _dbus_poll
(
structDBusPollFD.html
DBusPollFD
*
fds
,
int
n_fds
,
int
timeout_milliseconds
)
Wrapper for poll().
Parameters:
fds
the file descriptors to poll
n_fds
number of descriptors in the array
timeout_milliseconds
timeout or -1 for infinite
Returns:
numbers of fds with revents, or <0 on error
Definition at line
dbus-sysdeps_8c-source.html#l01856
1856
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8c-source.html#l00203
_dbus_warn()
,
dbus-sysdeps_8h-source.html#l00211
DBusPollFD::events
,
dbus-sysdeps_8h-source.html#l00210
DBusPollFD::fd
,
group__DBusMacros.html#ga4
NULL
, and
dbus-sysdeps_8h-source.html#l00212
DBusPollFD::revents
.
int _dbus_read
(
int
fd
,
structDBusString.html
DBusString
*
buffer
,
int
count
)
Thin wrapper around the read() system call that appends the data it reads to the
structDBusString.html
DBusString
buffer.
It appends up to the given count, and returns the same value and same errno as read(). The only exception is that
group__DBusInternalsUtils.html#ga58
_dbus_read()
handles EINTR for you.
group__DBusInternalsUtils.html#ga58
_dbus_read()
can return ENOMEM, even though regular UNIX read doesn't.
Parameters:
fd
the file descriptor to read from
buffer
the buffer to append data to
count
the amount of data to read
Returns:
the number of bytes read or -1
Definition at line
dbus-sysdeps_8c-source.html#l00191
191
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-string_8c-source.html#l00456
_dbus_string_get_data_len()
,
dbus-string_8c-source.html#l00811
_dbus_string_lengthen()
,
dbus-string_8c-source.html#l00853
_dbus_string_set_length()
, and
dbus-marshal-basic_8c-source.html#l01448
_dbus_verbose_bytes_of_string()
.
Referenced by
dbus-sysdeps_8c-source.html#l02014
_dbus_file_get_contents()
, and
dbus-sysdeps_8c-source.html#l02479
_dbus_generate_random_bytes()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_read_credentials_unix_socket
(
int
client_fd
,
structDBusCredentials.html
DBusCredentials
*
credentials
,
structDBusError.html
DBusError
*
error
)
Reads a single byte which must be nul (an error occurs otherwise), and reads unix credentials if available.
Fills in pid/uid/gid with -1 if no credentials are available. Return value indicates whether a byte was read, not whether we got valid credentials. On some systems, such as Linux, reading/writing the byte isn't actually required, but we do it anyway just to avoid multiple codepaths.
Fails if no byte is available, so you must select() first.
The point of the byte is that on some systems we have to use sendmsg()/recvmsg() to transmit credentials.
Parameters:
client_fd
the client file descriptor
credentials
struct to fill with credentials of client
error
location to store error code
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-sysdeps_8c-source.html#l00823
823
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-sysdeps_8c-source.html#l01700
_dbus_credentials_clear()
,
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00109
DBusCredentials::gid
,
dbus-sysdeps_8h-source.html#l00107
DBusCredentials::pid
,
group__DBusMacros.html#ga2
TRUE
, and
dbus-sysdeps_8h-source.html#l00108
DBusCredentials::uid
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_send_credentials_unix_socket
(
int
server_fd
,
structDBusError.html
DBusError
*
error
)
Sends a single nul byte with our UNIX credentials as ancillary data.
Returns
group__DBusMacros.html#ga2
TRUE
if the data was successfully written. On systems that don't support sending credentials, just writes a byte, doesn't send any credentials. On some systems, such as Linux, reading/writing the byte isn't actually required, but we do it anyway just to avoid multiple codepaths.
Fails if no byte can be written, so you must select() first.
The point of the byte is that on some systems we have to use sendmsg()/recvmsg() to transmit credentials.
Parameters:
server_fd
file descriptor for connection to server
error
return location for error code
Returns:
group__DBusMacros.html#ga2
TRUE
if the byte was sent
Definition at line
dbus-sysdeps_8c-source.html#l00960
960
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_set_fd_nonblocking
(
int
fd
,
structDBusError.html
DBusError
*
error
)
Sets a file descriptor to be nonblocking.
Parameters:
fd
the file descriptor.
error
address of error location.
Returns:
group__DBusMacros.html#ga2
TRUE
on success.
Definition at line
dbus-sysdeps_8c-source.html#l02745
2745
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-sysdeps_8c-source.html#l00594
_dbus_connect_tcp_socket()
,
dbus-sysdeps_8c-source.html#l00394
_dbus_connect_unix_socket()
,
dbus-sysdeps_8c-source.html#l02867
_dbus_full_duplex_pipe()
,
dbus-sysdeps_8c-source.html#l00673
_dbus_listen_tcp_socket()
, and
dbus-sysdeps_8c-source.html#l00484
_dbus_listen_unix_socket()
.
void _dbus_set_signal_handler
(
int
sig
,
DBusSignalHandler
handler
)
Installs a UNIX signal handler.
Parameters:
sig
the signal to handle
handler
the handler
Definition at line
dbus-sysdeps-util_8c-source.html#l00288
288
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_setenv
(
const char *
varname
,
const char *
value
)
Wrapper for setenv().
If the value is
group__DBusMacros.html#ga4
NULL
, unsets the environment variable.
todo.html#_todo000077
Todo:
if someone can verify it's safe, we could avoid the memleak when doing an unset.
Parameters:
varname
name of environment variable
value
value of environment variable
Returns:
group__DBusMacros.html#ga2
TRUE
on success.
Definition at line
dbus-sysdeps_8c-source.html#l00104
104
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
void _dbus_sleep_milliseconds
(
int
milliseconds
)
Sleeps the given number of milliseconds.
Parameters:
milliseconds
number of milliseconds
Definition at line
dbus-sysdeps_8c-source.html#l01963
1963
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l01956
MICROSECONDS_PER_MILLISECOND
,
dbus-sysdeps_8c-source.html#l01952
MILLISECONDS_PER_SECOND
, and
dbus-sysdeps_8c-source.html#l01954
NANOSECONDS_PER_MILLISECOND
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_spawn_async_with_babysitter
(
structDBusBabysitter.html
DBusBabysitter
**
sitter_p
,
char **
argv
,
DBusSpawnChildSetupFunc
child_setup
,
void *
user_data
,
structDBusError.html
DBusError
*
error
)
Spawns a new process.
The executable name and argv[0] are the same, both are provided in argv[0]. The child_setup function is passed the given user_data and is run in the child just before calling exec().
Also creates a "babysitter" which tracks the status of the child process, advising the parent if the child exits. If the spawn fails, no babysitter is created. If sitter_p is
group__DBusMacros.html#ga4
NULL
, no babysitter is kept.
Parameters:
sitter_p
return location for babysitter or
group__DBusMacros.html#ga4
NULL
argv
the executable and arguments
child_setup
function to call in child pre-exec()
user_data
user data for setup function
error
error object to be filled in if function fails
Returns:
group__DBusMacros.html#ga2
TRUE
on success,
group__DBusMacros.html#ga3
FALSE
if error is filled in
Definition at line
dbus-spawn_8c-source.html#l01030
1030
of file
dbus-spawn_8c-source.html
dbus-spawn.c
.
References
dbus-internals_8h-source.html#l00112
_dbus_assert_not_reached
,
dbus-spawn_8c-source.html#l00262
_dbus_babysitter_unref()
,
dbus-sysdeps_8c-source.html#l02587
_dbus_fd_set_close_on_exec()
,
dbus-sysdeps_8c-source.html#l02867
_dbus_full_duplex_pipe()
,
dbus-internals_8c-source.html#l00303
_dbus_strdup()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-watch_8c-source.html#l00351
_dbus_watch_list_add_watch()
,
dbus-watch_8c-source.html#l00067
_dbus_watch_new()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
dbus-spawn_8c-source.html#l00191
DBusBabysitter::error_pipe_from_child
,
dbus-spawn_8c-source.html#l00198
DBusBabysitter::error_watch
,
dbus-spawn_8c-source.html#l00188
DBusBabysitter::executable
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
,
dbus-spawn_8c-source.html#l00738
READ_END
,
dbus-spawn_8c-source.html#l00193
DBusBabysitter::sitter_pid
,
dbus-spawn_8c-source.html#l00199
DBusBabysitter::sitter_watch
,
dbus-spawn_8c-source.html#l00190
DBusBabysitter::socket_to_babysitter
,
group__DBusMacros.html#ga2
TRUE
,
dbus-spawn_8c-source.html#l00196
DBusBabysitter::watches
, and
dbus-spawn_8c-source.html#l00740
WRITE_END
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_stat
(
const
structDBusString.html
DBusString
*
filename
,
structDBusStat.html
DBusStat
*
statbuf
,
structDBusError.html
DBusError
*
error
)
stat() wrapper.
Parameters:
filename
the filename to stat
statbuf
the stat info to fill in
error
return location for error
Returns:
group__DBusMacros.html#ga3
FALSE
if error was set
Definition at line
dbus-sysdeps-util_8c-source.html#l00408
408
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-sysdeps_8h-source.html#l00285
DBusStat::atime
,
dbus-sysdeps_8h-source.html#l00287
DBusStat::ctime
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00283
DBusStat::gid
,
dbus-sysdeps_8h-source.html#l00280
DBusStat::mode
,
dbus-sysdeps_8h-source.html#l00286
DBusStat::mtime
,
dbus-sysdeps_8h-source.html#l00281
DBusStat::nlink
,
dbus-sysdeps_8h-source.html#l00284
DBusStat::size
,
group__DBusMacros.html#ga2
TRUE
, and
dbus-sysdeps_8h-source.html#l00282
DBusStat::uid
.
char* _dbus_strdup
(
const char *
str
)
Duplicates a string.
Result must be freed with
group__DBusMemory.html#ga3
dbus_free()
. Returns
group__DBusMacros.html#ga4
NULL
if memory allocation fails. If the string to be duplicated is
group__DBusMacros.html#ga4
NULL
, returns
group__DBusMacros.html#ga4
NULL
.
Parameters:
str
string to duplicate.
Returns:
newly-allocated copy.
Definition at line
dbus-internals_8c-source.html#l00303
303
of file
dbus-internals_8c-source.html
dbus-internals.c
.
References
dbus-memory_8c-source.html#l00437
dbus_malloc()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-internals_8c-source.html#l00354
_dbus_dup_string_array()
,
dbus-message_8c-source.html#l01760
_dbus_message_iter_get_args_valist()
,
dbus-server-unix_8c-source.html#l00315
_dbus_server_new_for_domain_socket()
,
dbus-spawn_8c-source.html#l01030
_dbus_spawn_async_with_babysitter()
,
dbus-transport_8c-source.html#l00438
_dbus_transport_get_is_authenticated()
,
dbus-transport_8c-source.html#l00212
_dbus_transport_open()
,
dbus-bus_8c-source.html#l00428
dbus_bus_register()
,
dbus-bus_8c-source.html#l00511
dbus_bus_set_unique_name()
, and
dbus-server_8c-source.html#l00848
dbus_server_get_address()
.
const char* _dbus_strerror
(
int
error_number
)
A wrapper around strerror() because some platforms may be lame and not have strerror().
Parameters:
error_number
errno.
Returns:
error description.
Definition at line
dbus-sysdeps_8c-source.html#l02559
2559
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-spawn_8c-source.html#l00633
_dbus_babysitter_set_child_exit_error()
,
dbus-spawn_8c-source.html#l00262
_dbus_babysitter_unref()
,
dbus-sysdeps-util_8c-source.html#l00064
_dbus_become_daemon()
,
dbus-sysdeps-util_8c-source.html#l00246
_dbus_change_identity()
,
dbus-sysdeps_8c-source.html#l01168
_dbus_check_dir_is_private_to_user()
,
dbus-sysdeps_8c-source.html#l00594
_dbus_connect_tcp_socket()
,
dbus-sysdeps_8c-source.html#l00394
_dbus_connect_unix_socket()
,
dbus-sysdeps_8c-source.html#l02329
_dbus_create_directory()
,
dbus-sysdeps_8c-source.html#l02256
_dbus_create_file_exclusively()
,
dbus-sysdeps-util_8c-source.html#l00310
_dbus_delete_directory()
,
dbus-sysdeps_8c-source.html#l02300
_dbus_delete_file()
,
dbus-sysdeps-util_8c-source.html#l00504
_dbus_directory_get_next_file()
,
dbus-sysdeps-util_8c-source.html#l00456
_dbus_directory_open()
,
dbus-sysdeps_8c-source.html#l02014
_dbus_file_get_contents()
,
dbus-sysdeps_8c-source.html#l00673
_dbus_listen_tcp_socket()
,
dbus-sysdeps_8c-source.html#l00484
_dbus_listen_unix_socket()
,
dbus-sysdeps_8c-source.html#l00823
_dbus_read_credentials_unix_socket()
,
dbus-sysdeps_8c-source.html#l02745
_dbus_set_fd_nonblocking()
,
dbus-spawn_8c-source.html#l01030
_dbus_spawn_async_with_babysitter()
,
dbus-sysdeps-util_8c-source.html#l00408
_dbus_stat()
,
dbus-sysdeps_8c-source.html#l02120
_dbus_string_save_to_file()
, and
dbus-sysdeps-util_8c-source.html#l00189
_dbus_write_pid_file()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_string_array_contains
(
const char **
array
,
const char *
str
)
Checks whether a string array contains the given string.
Parameters:
array
array to search.
str
string to look for
Returns:
group__DBusMacros.html#ga2
TRUE
if array contains string
Definition at line
dbus-internals_8c-source.html#l00394
394
of file
dbus-internals_8c-source.html
dbus-internals.c
.
References
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_string_save_to_file
(
const
structDBusString.html
DBusString
*
str
,
const
structDBusString.html
DBusString
*
filename
,
structDBusError.html
DBusError
*
error
)
Writes a string out to a file.
If the file exists, it will be atomically overwritten by the new data.
Parameters:
str
the string to write out
filename
the file to save string to
error
error to be filled in on failure
Returns:
group__DBusMacros.html#ga3
FALSE
on failure
Definition at line
dbus-sysdeps_8c-source.html#l02120
2120
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02523
_dbus_generate_random_ascii()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-string_8c-source.html#l00986
_dbus_string_append()
,
dbus-string_8c-source.html#l01472
_dbus_string_copy()
,
dbus-string_8c-source.html#l00261
_dbus_string_free()
,
dbus-string_8c-source.html#l00174
_dbus_string_init()
,
dbus-sysdeps_8c-source.html#l00251
_dbus_write()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_at_console
(
const char *
username
,
structDBusError.html
DBusError
*
error
)
Checks if user is at the console.
Parameters:
username
user to check
error
return location for errors
Returns:
group__DBusMacros.html#ga2
TRUE
is the user is at the consolei and there are no errors
Definition at line
dbus-sysdeps-util_8c-source.html#l00348
348
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps-util_8c-source.html#l00336
_dbus_file_exists()
,
dbus-string_8c-source.html#l00986
_dbus_string_append()
,
dbus-string_8c-source.html#l00261
_dbus_string_free()
,
dbus-string_8c-source.html#l00174
_dbus_string_init()
, and
group__DBusMacros.html#ga3
FALSE
.
Referenced by
dbus-userdb-util_8c-source.html#l00043
_dbus_is_console_user()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_database_get_gid
(
DBusUserDatabase *
db
,
dbus_gid_t
gid
,
const
structDBusGroupInfo.html
DBusGroupInfo
**
info
,
structDBusError.html
DBusError
*
error
)
Gets the user information for the given GID, returned group info should not be freed.
Parameters:
db
user database
gid
the group ID
info
return location for const ref to group info
error
error location
Returns:
group__DBusMacros.html#ga3
FALSE
if error is set
Definition at line
dbus-userdb-util_8c-source.html#l00311
311
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-userdb-util_8c-source.html#l00189
_dbus_user_database_lookup_group()
, and
group__DBusMacros.html#ga4
NULL
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_database_get_groupname
(
DBusUserDatabase *
db
,
const
structDBusString.html
DBusString
*
groupname
,
const
structDBusGroupInfo.html
DBusGroupInfo
**
info
,
structDBusError.html
DBusError
*
error
)
Gets the user information for the given group name, returned group info should not be freed.
Parameters:
db
user database
groupname
the group name
info
return location for const ref to group info
error
error location
Returns:
group__DBusMacros.html#ga3
FALSE
if error is set
Definition at line
dbus-userdb-util_8c-source.html#l00291
291
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-userdb-util_8c-source.html#l00189
_dbus_user_database_lookup_group()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb-util_8c-source.html#l00149
_dbus_get_group_id()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_database_get_groups
(
DBusUserDatabase *
db
,
dbus_uid_t
uid
,
dbus_gid_t **
group_ids
,
int *
n_group_ids
,
structDBusError.html
DBusError
*
error
)
Gets all groups for a particular user.
Returns
group__DBusMacros.html#ga3
FALSE
if no memory, or user isn't known, but always initializes group_ids to a NULL array. Sets error to the reason for returning
group__DBusMacros.html#ga3
FALSE
.
Parameters:
db
the user database object
uid
the user ID
group_ids
return location for array of group IDs
n_group_ids
return location for length of returned array
error
return location for error
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-userdb-util_8c-source.html#l00335
335
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
,
dbus-memory_8h-source.html#l00041
dbus_new
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
dbus-sysdeps_8h-source.html#l00149
DBusUserInfo::group_ids
,
dbus-sysdeps_8h-source.html#l00150
DBusUserInfo::n_group_ids
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
DBusUserDatabase* _dbus_user_database_get_system
(
void
)
Gets the system global user database; must be called with lock held (
group__DBusInternalsUtils.html#ga119
_dbus_user_database_lock_system()
).
Returns:
the database or
group__DBusMacros.html#ga4
NULL
if no memory
Definition at line
dbus-userdb_8c-source.html#l00305
305
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
.
Referenced by
dbus-userdb-util_8c-source.html#l00085
_dbus_credentials_from_uid()
,
dbus-userdb_8c-source.html#l00405
_dbus_credentials_from_username()
,
dbus-userdb-util_8c-source.html#l00149
_dbus_get_group_id()
,
dbus-userdb_8c-source.html#l00366
_dbus_homedir_from_username()
, and
dbus-userdb-util_8c-source.html#l00043
_dbus_is_console_user()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_database_get_uid
(
DBusUserDatabase *
db
,
dbus_uid_t
uid
,
const
structDBusUserInfo.html
DBusUserInfo
**
info
,
structDBusError.html
DBusError
*
error
)
Gets the user information for the given UID, returned user info should not be freed.
Parameters:
db
user database
uid
the user ID
info
return location for const ref to user info
error
error location
Returns:
group__DBusMacros.html#ga3
FALSE
if error is set
Definition at line
dbus-userdb_8c-source.html#l00535
535
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb-util_8c-source.html#l00085
_dbus_credentials_from_uid()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_database_get_username
(
DBusUserDatabase *
db
,
const
structDBusString.html
DBusString
*
username
,
const
structDBusUserInfo.html
DBusUserInfo
**
info
,
structDBusError.html
DBusError
*
error
)
Gets the user information for the given username.
Parameters:
db
user database
username
the user name
info
return location for const ref to user info
error
error location
Returns:
group__DBusMacros.html#ga3
FALSE
if error is set
Definition at line
dbus-userdb_8c-source.html#l00554
554
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb_8c-source.html#l00405
_dbus_credentials_from_username()
, and
dbus-userdb_8c-source.html#l00366
_dbus_homedir_from_username()
.
structDBusUserInfo.html
DBusUserInfo
* _dbus_user_database_lookup
(
DBusUserDatabase *
db
,
dbus_uid_t
uid
,
const
structDBusString.html
DBusString
*
username
,
structDBusError.html
DBusError
*
error
)
Looks up a uid or username in the user database.
Only one of name or UID can be provided. There are wrapper functions for this that are better to use, this one does no locking or anything on the database and otherwise sort of sucks.
Parameters:
db
the database
uid
the user ID or DBUS_UID_UNSET
username
username or
group__DBusMacros.html#ga4
NULL
error
error to fill in
Returns:
the entry in the database
Definition at line
dbus-userdb_8c-source.html#l00102
102
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-hash_8c-source.html#l01415
_dbus_hash_table_insert_string()
,
dbus-hash_8c-source.html#l01577
_dbus_hash_table_insert_ulong()
,
dbus-hash_8c-source.html#l01134
_dbus_hash_table_lookup_string()
,
dbus-hash_8c-source.html#l01239
_dbus_hash_table_lookup_ulong()
,
dbus-hash_8c-source.html#l01380
_dbus_hash_table_remove_ulong()
,
dbus-userdb_8c-source.html#l00077
_dbus_is_a_number()
,
dbus-sysdeps_8c-source.html#l01655
_dbus_user_info_fill()
,
dbus-sysdeps_8c-source.html#l01672
_dbus_user_info_fill_uid()
,
dbus-userdb_8c-source.html#l00043
_dbus_user_info_free_allocated()
,
dbus-memory_8h-source.html#l00042
dbus_new0
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga4
NULL
,
dbus-sysdeps_8h-source.html#l00147
DBusUserInfo::uid
, and
dbus-sysdeps_8h-source.html#l00151
DBusUserInfo::username
.
Referenced by
dbus-userdb-util_8c-source.html#l00043
_dbus_is_console_user()
,
dbus-userdb-util_8c-source.html#l00335
_dbus_user_database_get_groups()
,
dbus-userdb_8c-source.html#l00535
_dbus_user_database_get_uid()
, and
dbus-userdb_8c-source.html#l00554
_dbus_user_database_get_username()
.
structDBusGroupInfo.html
DBusGroupInfo
* _dbus_user_database_lookup_group
(
DBusUserDatabase *
db
,
dbus_gid_t
gid
,
const
structDBusString.html
DBusString
*
groupname
,
structDBusError.html
DBusError
*
error
)
Looks up a gid or group name in the user database.
Only one of name or GID can be provided. There are wrapper functions for this that are better to use, this one does no locking or anything on the database and otherwise sort of sucks.
Parameters:
db
the database
gid
the group ID or DBUS_GID_UNSET
groupname
group name or
group__DBusMacros.html#ga4
NULL
error
error to fill in
Returns:
the entry in the database
Definition at line
dbus-userdb-util_8c-source.html#l00189
189
of file
dbus-userdb-util_8c-source.html
dbus-userdb-util.c
.
References
dbus-sysdeps-util_8c-source.html#l00657
_dbus_group_info_fill()
,
dbus-sysdeps-util_8c-source.html#l00676
_dbus_group_info_fill_gid()
,
dbus-userdb_8c-source.html#l00059
_dbus_group_info_free_allocated()
,
dbus-hash_8c-source.html#l01415
_dbus_hash_table_insert_string()
,
dbus-hash_8c-source.html#l01577
_dbus_hash_table_insert_ulong()
,
dbus-hash_8c-source.html#l01134
_dbus_hash_table_lookup_string()
,
dbus-hash_8c-source.html#l01239
_dbus_hash_table_lookup_ulong()
,
dbus-hash_8c-source.html#l01380
_dbus_hash_table_remove_ulong()
,
dbus-userdb_8c-source.html#l00077
_dbus_is_a_number()
,
dbus-memory_8h-source.html#l00042
dbus_new0
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
dbus-sysdeps_8h-source.html#l00160
DBusGroupInfo::gid
,
dbus-sysdeps_8h-source.html#l00161
DBusGroupInfo::groupname
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb-util_8c-source.html#l00311
_dbus_user_database_get_gid()
, and
dbus-userdb-util_8c-source.html#l00291
_dbus_user_database_get_groupname()
.
DBusUserDatabase* _dbus_user_database_new
(
void
)
Creates a new user database object used to look up and cache user information.
Returns:
new database, or
group__DBusMacros.html#ga4
NULL
on out of memory
Definition at line
dbus-userdb_8c-source.html#l00440
440
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-userdb_8c-source.html#l00059
_dbus_group_info_free_allocated()
,
dbus-hash_8c-source.html#l00292
_dbus_hash_table_new()
,
dbus-userdb_8c-source.html#l00501
_dbus_user_database_unref()
,
dbus-userdb_8c-source.html#l00043
_dbus_user_info_free_allocated()
,
dbus-memory_8h-source.html#l00042
dbus_new0
, and
group__DBusMacros.html#ga4
NULL
.
void _dbus_user_database_unref
(
DBusUserDatabase *
db
)
Decrements refcount of user database.
Parameters:
db
the database
Definition at line
dbus-userdb_8c-source.html#l00501
501
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-hash_8c-source.html#l00374
_dbus_hash_table_unref()
, and
dbus-memory_8c-source.html#l00612
dbus_free()
.
Referenced by
dbus-userdb_8c-source.html#l00440
_dbus_user_database_new()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_info_fill
(
structDBusUserInfo.html
DBusUserInfo
*
info
,
const
structDBusString.html
DBusString
*
username
,
structDBusError.html
DBusError
*
error
)
Gets user info for the given username.
Parameters:
info
user info object to initialize
username
the username
error
error return
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-sysdeps_8c-source.html#l01655
1655
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
Referenced by
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_user_info_fill_uid
(
structDBusUserInfo.html
DBusUserInfo
*
info
,
dbus_uid_t
uid
,
structDBusError.html
DBusError
*
error
)
Gets user info for the given user ID.
Parameters:
info
user info object to initialize
uid
the user ID
error
error return
Returns:
group__DBusMacros.html#ga2
TRUE
on success
Definition at line
dbus-sysdeps_8c-source.html#l01672
1672
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
.
void _dbus_user_info_free
(
structDBusUserInfo.html
DBusUserInfo
*
info
)
Frees the members of info (but not info itself).
Parameters:
info
the user info struct
Definition at line
dbus-sysdeps_8c-source.html#l01686
1686
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-memory_8c-source.html#l00612
dbus_free()
,
dbus-sysdeps_8h-source.html#l00149
DBusUserInfo::group_ids
,
dbus-sysdeps_8h-source.html#l00152
DBusUserInfo::homedir
, and
dbus-sysdeps_8h-source.html#l00151
DBusUserInfo::username
.
Referenced by
dbus-userdb_8c-source.html#l00043
_dbus_user_info_free_allocated()
.
void _dbus_user_info_free_allocated
(
structDBusUserInfo.html
DBusUserInfo
*
info
)
Frees the given
structDBusUserInfo.html
DBusUserInfo
's members with
group__DBusInternalsUtils.html#ga73
_dbus_user_info_free()
and also calls
group__DBusMemory.html#ga3
dbus_free()
on the block itself.
Parameters:
info
the info
Definition at line
dbus-userdb_8c-source.html#l00043
43
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-sysdeps_8c-source.html#l01686
_dbus_user_info_free()
,
dbus-memory_8c-source.html#l00612
dbus_free()
, and
group__DBusMacros.html#ga4
NULL
.
Referenced by
dbus-userdb_8c-source.html#l00102
_dbus_user_database_lookup()
, and
dbus-userdb_8c-source.html#l00440
_dbus_user_database_new()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_username_from_current_process
(
const
structDBusString.html
DBusString
**
username
)
Gets username of user owning current process.
The returned string is valid until
group__DBusMemory.html#ga5
dbus_shutdown()
is called.
Parameters:
username
place to store pointer to username
Returns:
group__DBusMacros.html#ga3
FALSE
if no memory
Definition at line
dbus-userdb_8c-source.html#l00322
322
of file
dbus-userdb_8c-source.html
dbus-userdb.c
.
References
dbus-userdb_8c-source.html#l00282
_dbus_user_database_lock_system()
,
dbus-userdb_8c-source.html#l00292
_dbus_user_database_unlock_system()
,
group__DBusMacros.html#ga3
FALSE
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
.
void _dbus_warn
(
const char *
format
,
...
)
Prints a warning message to stderr.
Parameters:
format
printf-style format string.
Definition at line
dbus-internals_8c-source.html#l00203
203
of file
dbus-internals_8c-source.html
dbus-internals.c
.
Referenced by
dbus-spawn_8c-source.html#l00262
_dbus_babysitter_unref()
,
dbus-sysdeps-util_8c-source.html#l00246
_dbus_change_identity()
,
dbus-sysdeps_8c-source.html#l02867
_dbus_full_duplex_pipe()
,
dbus-keyring_8c-source.html#l00715
_dbus_keyring_new_homedir()
,
dbus-sysdeps_8c-source.html#l00484
_dbus_listen_unix_socket()
,
dbus-marshal-basic_8c-source.html#l00503
_dbus_marshal_read_basic()
,
dbus-marshal-basic_8c-source.html#l01131
_dbus_marshal_skip_basic()
,
dbus-message_8c-source.html#l01760
_dbus_message_iter_get_args_valist()
,
dbus-object-tree_8c-source.html#l00403
_dbus_object_tree_register()
,
dbus-object-tree_8c-source.html#l00446
_dbus_object_tree_unregister_and_unlock()
,
dbus-sysdeps_8c-source.html#l01856
_dbus_poll()
,
dbus-transport_8c-source.html#l00603
_dbus_transport_handle_watch()
,
dbus-marshal-recursive_8c-source.html#l01084
_dbus_type_reader_recurse()
,
dbus-bus_8c-source.html#l00428
dbus_bus_register()
,
dbus-connection_8c-source.html#l04198
dbus_connection_remove_filter()
,
dbus-connection_8c-source.html#l03867
dbus_connection_set_timeout_functions()
,
dbus-connection_8c-source.html#l03785
dbus_connection_set_watch_functions()
,
dbus-message_8c-source.html#l01222
dbus_message_append_args_valist()
,
dbus-server_8c-source.html#l00967
dbus_server_set_timeout_functions()
,
dbus-server_8c-source.html#l00914
dbus_server_set_watch_functions()
,
dbus-threads_8c-source.html#l00306
dbus_threads_init()
, and
dbus-watch_8c-source.html#l00591
dbus_watch_handle()
.
int _dbus_write
(
int
fd
,
const
structDBusString.html
DBusString
*
buffer
,
int
start
,
int
len
)
Thin wrapper around the write() system call that writes a part of a
structDBusString.html
DBusString
and handles EINTR for you.
Parameters:
fd
the file descriptor to write
buffer
the buffer to write data from
start
the first byte in the buffer to write
len
the number of bytes to try to write
Returns:
the number of bytes written or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00251
251
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-marshal-basic_8c-source.html#l01448
_dbus_verbose_bytes_of_string()
.
Referenced by
dbus-sysdeps-util_8c-source.html#l00064
_dbus_become_daemon()
,
dbus-sysdeps_8c-source.html#l02120
_dbus_string_save_to_file()
, and
dbus-sysdeps_8c-source.html#l00297
_dbus_write_two()
.
group__DBusTypes.html#ga2
dbus_bool_t
_dbus_write_pid_file
(
const
structDBusString.html
DBusString
*
filename
,
unsigned long
pid
,
structDBusError.html
DBusError
*
error
)
Creates a file containing the process ID.
Parameters:
filename
the filename to write to
pid
our process ID
error
return location for errors
Returns:
group__DBusMacros.html#ga3
FALSE
on failure
Definition at line
dbus-sysdeps-util_8c-source.html#l00189
189
of file
dbus-sysdeps-util_8c-source.html
dbus-sysdeps-util.c
.
References
dbus-sysdeps_8c-source.html#l02611
_dbus_error_from_errno()
,
dbus-sysdeps_8c-source.html#l02559
_dbus_strerror()
,
dbus-errors_8c-source.html#l00313
dbus_set_error()
,
group__DBusMacros.html#ga3
FALSE
,
group__DBusMacros.html#ga4
NULL
, and
group__DBusMacros.html#ga2
TRUE
.
Referenced by
dbus-sysdeps-util_8c-source.html#l00064
_dbus_become_daemon()
.
int _dbus_write_two
(
int
fd
,
const
structDBusString.html
DBusString
*
buffer1
,
int
start1
,
int
len1
,
const
structDBusString.html
DBusString
*
buffer2
,
int
start2
,
int
len2
)
Like
group__DBusInternalsUtils.html#ga59
_dbus_write()
but will use writev() if possible to write both buffers in sequence.
The return value is the number of bytes written in the first buffer, plus the number written in the second. If the first buffer is written successfully and an error occurs writing the second, the number of bytes in the first is returned (i.e. the error is ignored), on systems that don't have writev. Handles EINTR for you. The second buffer may be
group__DBusMacros.html#ga4
NULL
.
Parameters:
fd
the file descriptor
buffer1
first buffer
start1
first byte to write in first buffer
len1
number of bytes to write from first buffer
buffer2
second buffer, or
group__DBusMacros.html#ga4
NULL
start2
first byte to write in second buffer
len2
number of bytes to write in second buffer
Returns:
total bytes written from both buffers, or -1 on error
Definition at line
dbus-sysdeps_8c-source.html#l00297
297
of file
dbus-sysdeps_8c-source.html
dbus-sysdeps.c
.
References
dbus-internals_8h-source.html#l00100
_dbus_assert
,
dbus-sysdeps_8c-source.html#l00251
_dbus_write()
, and
group__DBusMacros.html#ga4
NULL
.
Variable Documentation
const char
group__DBusInternalsUtils.html#ga1
_dbus_return_if_fail_warning_format
[]
Initial value:
"%lu: arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\n"
"This is normally a bug in some application using the D-BUS library.\n"
String used in _dbus_return_if_fail macro.
Definition at line
dbus-internals_8c-source.html#l00448
448
of file
dbus-internals_8c-source.html
dbus-internals.c
.
Generated on Tue Sep 13 01:28:09 2005 for D-BUS by
http://www.doxygen.org/index.html
doxygen
1.4.4
