free(tmp_file);
}
-static void pw_edit(int notsetuid)
+static void pw_edit(void)
{
int pstat;
pid_t pid;
err(EXIT_FAILURE, _("fork failed"));
if (!pid) {
- if (notsetuid) {
- (void)setgid(getgid());
- (void)setuid(getuid());
- }
execlp(editor, p, tmp_file, NULL);
/* Shouldn't get here */
_exit(EXIT_FAILURE);
if (fstat(fileno(tmp_fd), &begin))
pw_error(tmp_file, 1, 1);
- pw_edit(0);
+ pw_edit();
if (fstat(fileno(tmp_fd), &end))
pw_error(tmp_file, 1, 1);