chiark / gitweb /
catalog: open up catalog internals
[elogind.git] / src / shared / util.h
index 7c032b6b62962b199b3a012a13439351b0308254..aefde5f85a23ffc25e4f3ca974b19892a2b678ff 100644 (file)
@@ -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) {
@@ -605,3 +607,7 @@ static inline void *mempset(void *s, int c, size_t n) {
         memset(s, c, n);
         return (char*)s + n;
 }
+
+char *hexmem(const void *p, size_t l);
+char *strextend(char **x, ...);
+char *strrep(const char *s, unsigned n);