Index: lib/libutil/pw_util.c =================================================================== --- lib/libutil/pw_util.c +++ lib/libutil/pw_util.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -315,7 +314,7 @@ (void)setuid(getuid()); } errno = 0; - execlp(editor, basename(editor), tempname, (char *)NULL); + execlp(editor, editor, tempname, (char *)NULL); _exit(errno); default: /* parent */ Index: sbin/hastd/hooks.c =================================================================== --- sbin/hastd/hooks.c +++ sbin/hastd/hooks.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include @@ -352,7 +351,7 @@ return; memset(args, 0, sizeof(args)); - args[0] = basename(path); + args[0] = __DECONST(char *, path); for (ii = 1; ii < sizeof(args) / sizeof(args[0]); ii++) { args[ii] = va_arg(ap, char *); if (args[ii] == NULL) Index: usr.bin/newgrp/newgrp.c =================================================================== --- usr.bin/newgrp/newgrp.c +++ usr.bin/newgrp/newgrp.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -290,7 +289,7 @@ if (ticket != NULL) setenv("KRBTKFILE", ticket, 1); - if (asprintf(args, "-%s", basename(shell)) < 0) + if (asprintf(args, "-%s", shell) < 0) err(1, "asprintf"); args[1] = NULL; @@ -306,6 +305,6 @@ shell = pwd->pw_shell; if (*shell == '\0') shell = _PATH_BSHELL; - execl(shell, basename(shell), (char *)NULL); + execl(shell, shell, (char *)NULL); err(1, "%s", shell); }