kwo pushed a commit to branch master. http://git.enlightenment.org/e16/e16.git/commit/?id=bd8433bdfcc703b88e3399248eda1ccac74f9512
commit bd8433bdfcc703b88e3399248eda1ccac74f9512 Author: Kim Woelders <k...@woelders.dk> Date: Tue Feb 15 15:21:05 2022 +0100 Remove now unused usershell() --- src/user.c | 17 +---------------- src/user.h | 3 +-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/user.c b/src/user.c index 28bf9df7..743669d8 100644 --- a/src/user.c +++ b/src/user.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2012-2015 Kim Woelders + * Copyright (C) 2012-2022 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -35,7 +35,6 @@ static int usr_uid = -1; static const char *usr_name = "unknown"; static const char *usr_home = "/tmp"; -static const char *usr_shell = "/bin/sh"; static void _user_init(void) @@ -60,12 +59,6 @@ _user_init(void) ss = Estrdup(pwd->pw_dir); if (ss) usr_home = ss; - if (canexec(pwd->pw_shell)) - { - ss = Estrdup(pwd->pw_shell); - if (ss) - usr_shell = ss; - } } const char * @@ -83,11 +76,3 @@ userhome(void) _user_init(); return usr_home; } - -const char * -usershell(void) -{ - if (usr_uid < 0) - _user_init(); - return usr_shell; -} diff --git a/src/user.h b/src/user.h index cb9b220e..1ab2c820 100644 --- a/src/user.h +++ b/src/user.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2012 Kim Woelders + * Copyright (C) 2012-2022 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -26,6 +26,5 @@ const char *username(void); const char *userhome(void); -const char *usershell(void); #endif /* _USER_H_ */ --