chiark / gitweb /
unit: introduce %s specifier for the user shell
[elogind.git] / src / shared / util.h
index 47497b578c36001b5314b6c07d25947a0587b528..3915904442e2047ba7993832429c61812213f141 100644 (file)
@@ -278,6 +278,7 @@ char *format_timespan(char *buf, size_t l, usec_t t);
 
 int make_stdio(int fd);
 int make_null_stdio(void);
+int make_console_stdio(void);
 
 unsigned long long random_ull(void);
 
@@ -344,9 +345,11 @@ void rename_process(const char name[8]);
 
 void sigset_add_many(sigset_t *ss, ...);
 
-char* gethostname_malloc(void);
 bool hostname_is_set(void);
+
+char* gethostname_malloc(void);
 char* getlogname_malloc(void);
+char* getusername_malloc(void);
 
 int getttyname_malloc(int fd, char **r);
 int getttyname_harder(int fd, char **r);
@@ -358,7 +361,9 @@ int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);
 int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid);
 
 int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev);
+int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev);
 int rm_rf(const char *path, bool only_dirs, bool delete_root, bool honour_sticky);
+int rm_rf_dangerous(const char *path, bool only_dirs, bool delete_root, bool honour_sticky);
 
 int pipe_eof(int fd);
 
@@ -436,7 +441,7 @@ int fchmod_umask(int fd, mode_t mode);
 bool display_is_local(const char *display);
 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);
+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_group(const char *name);
@@ -448,7 +453,7 @@ int dirent_ensure_type(DIR *d, struct dirent *de);
 int in_search_path(const char *path, char **search);
 int get_files_in_directory(const char *path, char ***list);
 
-char *join(const char *x, ...) _sentinel_;
+char *strjoin(const char *x, ...) _sentinel_;
 
 bool is_main_thread(void);
 
@@ -524,4 +529,7 @@ bool in_initrd(void);
 
 void warn_melody(void);
 
+int get_shell(char **ret);
+int get_home_dir(char **ret);
+
 #endif