aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-04-23 15:27:28 +0100
committerRon Yorston <rmy@pobox.com>2012-04-23 15:27:28 +0100
commit9f13ad33483464c76a36b9ac7b7a99e1c7709dcb (patch)
tree2cdc2efafbba2b948ca111471290ce94bb83657d
parent15e948bdabe8fc69d821a20dfe2bf00b56eb99f3 (diff)
downloadbusybox-w32-9f13ad33483464c76a36b9ac7b7a99e1c7709dcb.tar.gz
busybox-w32-9f13ad33483464c76a36b9ac7b7a99e1c7709dcb.tar.bz2
busybox-w32-9f13ad33483464c76a36b9ac7b7a99e1c7709dcb.zip
win32: add pw_shell to struct passwd
-rw-r--r--include/mingw.h1
-rw-r--r--libbb/get_shell_name.c2
-rw-r--r--win32/mingw.c1
3 files changed, 2 insertions, 2 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 2cae375a6..04f2592d9 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -82,6 +82,7 @@ struct passwd {
82 char *pw_name; 82 char *pw_name;
83 char *pw_gecos; 83 char *pw_gecos;
84 char *pw_dir; 84 char *pw_dir;
85 char *pw_shell;
85 uid_t pw_uid; 86 uid_t pw_uid;
86 gid_t pw_gid; 87 gid_t pw_gid;
87}; 88};
diff --git a/libbb/get_shell_name.c b/libbb/get_shell_name.c
index d196d293d..c930afd94 100644
--- a/libbb/get_shell_name.c
+++ b/libbb/get_shell_name.c
@@ -17,11 +17,9 @@ const char *get_shell_name(void)
17 if (shell && shell[0]) 17 if (shell && shell[0])
18 return shell; 18 return shell;
19 19
20#if !ENABLE_PLATFORM_MINGW32
21 pw = getpwuid(getuid()); 20 pw = getpwuid(getuid());
22 if (pw && pw->pw_shell && pw->pw_shell[0]) 21 if (pw && pw->pw_shell && pw->pw_shell[0])
23 return pw->pw_shell; 22 return pw->pw_shell;
24#endif
25 23
26 return DEFAULT_SHELL; 24 return DEFAULT_SHELL;
27} 25}
diff --git a/win32/mingw.c b/win32/mingw.c
index 657d106ed..4c7465482 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -534,6 +534,7 @@ struct passwd *getpwuid(int uid UNUSED_PARAM)
534 p.pw_name = user_name; 534 p.pw_name = user_name;
535 p.pw_gecos = "unknown"; 535 p.pw_gecos = "unknown";
536 p.pw_dir = gethomedir(); 536 p.pw_dir = gethomedir();
537 p.pw_shell = NULL;
537 return &p; 538 return &p;
538} 539}
539 540