summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtysh/vtysh_user.c')
-rw-r--r--vtysh/vtysh_user.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vtysh/vtysh_user.c b/vtysh/vtysh_user.c
index 7e10d68e..239a633f 100644
--- a/vtysh/vtysh_user.c
+++ b/vtysh/vtysh_user.c
@@ -191,6 +191,16 @@ vtysh_auth (void)
return 0;
}
+char *
+vtysh_get_home (void)
+{
+ struct passwd *passwd;
+
+ passwd = getpwuid (getuid ());
+
+ return passwd ? passwd->pw_dir : NULL;
+}
+
void
vtysh_user_init (void)
{