X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=d25b7ee1ee4c9925224cd027d6725d7d85f524ea;hb=ac6a4abed3e69daf6795e02fa4be1719ae6ae6ab;hp=89e9a00afcc34b0d3571c3a651a54be10d1b0b6e;hpb=f56d5db919902851535ac1591d5c95ebcd3a0b17;p=elogind.git diff --git a/src/shared/util.h b/src/shared/util.h index 89e9a00af..d25b7ee1e 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -1,7 +1,6 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#ifndef fooutilhfoo -#define fooutilhfoo +#pragma once /*** This file is part of systemd. @@ -278,6 +277,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 +344,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); @@ -438,7 +440,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); @@ -450,7 +452,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); @@ -526,4 +528,5 @@ bool in_initrd(void); void warn_melody(void); -#endif +int get_shell(char **ret); +int get_home_dir(char **ret);