Page MenuHomeFreeBSD

D6093.diff
No OneTemporary

D6093.diff

Index: head/lib/libutil/pw_util.c
===================================================================
--- head/lib/libutil/pw_util.c
+++ head/lib/libutil/pw_util.c
@@ -58,7 +58,6 @@
#include <err.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <libgen.h>
#include <paths.h>
#include <pwd.h>
#include <signal.h>
@@ -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: head/sbin/hastd/hooks.c
===================================================================
--- head/sbin/hastd/hooks.c
+++ head/sbin/hastd/hooks.c
@@ -37,7 +37,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <libgen.h>
#include <paths.h>
#include <signal.h>
#include <stdbool.h>
@@ -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: head/usr.bin/newgrp/newgrp.c
===================================================================
--- head/usr.bin/newgrp/newgrp.c
+++ head/usr.bin/newgrp/newgrp.c
@@ -36,7 +36,6 @@
#include <err.h>
#include <errno.h>
#include <grp.h>
-#include <libgen.h>
#include <limits.h>
#include <login_cap.h>
#include <paths.h>
@@ -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);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 31, 6:29 PM (4 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28153246
Default Alt Text
D6093.diff (1 KB)

Event Timeline