summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-03-26 12:08:20 +0000
committerJim Meyering <jim@meyering.net>2006-03-26 12:08:20 +0000
commit1225a5306820bd4f581474321647427268cdbbca (patch)
tree8e9c8f354f4631d19ed4a1c0c4b4fd00c80ab5aa /src
parentb828255717a1e12fb85f926789382874a1773c7a (diff)
downloadcoreutils-1225a5306820bd4f581474321647427268cdbbca.tar.xz
(log_su, run_shell): Use new last_component, in place of base_name.
Diffstat (limited to 'src')
-rw-r--r--src/su.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/su.c b/src/su.c
index 1abae322f..c689ef739 100644
--- a/src/su.c
+++ b/src/su.c
@@ -1,5 +1,5 @@
/* su for GNU. Run a shell with substitute user and group IDs.
- Copyright (C) 1992-2005 Free Software Foundation, Inc.
+ Copyright (C) 1992-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -219,7 +219,7 @@ log_su (struct passwd const *pw, bool successful)
if (!tty)
tty = "none";
/* 4.2BSD openlog doesn't have the third parameter. */
- openlog (base_name (program_name), 0
+ openlog (last_component (program_name), 0
# ifdef LOG_AUTH
, LOG_AUTH
# endif
@@ -350,14 +350,14 @@ run_shell (char const *shell, char const *command, char **additional_args,
char *arg0;
char *shell_basename;
- shell_basename = base_name (shell);
+ shell_basename = last_component (shell);
arg0 = xmalloc (strlen (shell_basename) + 2);
arg0[0] = '-';
strcpy (arg0 + 1, shell_basename);
args[0] = arg0;
}
else
- args[0] = base_name (shell);
+ args[0] = last_component (shell);
if (fast_startup)
args[argno++] = "-f";
if (command)