X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=aefde5f85a23ffc25e4f3ca974b19892a2b678ff;hp=f75c66bb83ea14360208cfc045b78cd52d9e1353;hb=844ec79b3c2f246114ea316ebe1f36044bdb688e;hpb=9a17484d986f6cb8828afdf911db425b574c63fd diff --git a/src/shared/util.h b/src/shared/util.h index f75c66bb8..aefde5f85 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -329,6 +329,7 @@ ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll); bool is_device_path(const char *path); int dir_is_empty(const char *path); +char* dirname_malloc(const char *path); void rename_process(const char name[8]); @@ -429,9 +430,11 @@ int socket_from_display(const char *display, char **path); int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **home, const char **shell); int get_group_creds(const char **groupname, gid_t *gid); +int in_gid(gid_t gid); int in_group(const char *name); char* uid_to_name(uid_t uid); +char* gid_to_name(gid_t gid); int glob_exists(const char *path); @@ -517,7 +520,6 @@ bool in_initrd(void); void warn_melody(void); -int get_shell(char **ret); int get_home_dir(char **ret); static inline void freep(void *p) {