Print this page
10125 smatch fixes for cmd-inet
*** 6,15 ****
--- 6,20 ----
* 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 the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
+
+ /*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <syslog.h>
*** 68,78 ****
(void) seteuid(getuid());
(void) setegid(getgid());
argv[0] = promptprog;
argv[1] = user == NULL ? "" : user;
argv[2] = remote_name;
! slprintf(fdstr, sizeof (fdstr), "%d", p[1]);
argv[3] = fdstr;
argv[4] = NULL;
(void) execv(*argv, argv);
_exit(127);
}
--- 73,83 ----
(void) seteuid(getuid());
(void) setegid(getgid());
argv[0] = promptprog;
argv[1] = user == NULL ? "" : user;
argv[2] = remote_name;
! (void) slprintf(fdstr, sizeof (fdstr), "%d", p[1]);
argv[3] = fdstr;
argv[4] = NULL;
(void) execv(*argv, argv);
_exit(127);
}