mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-30 00:46:05 +03:00
cleaning commandline on server too
This commit is contained in:
parent
c6f46ebaf9
commit
d9ca124e18
@ -451,17 +451,17 @@ version() {
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int choice;
|
|
||||||
int tun_fd;
|
|
||||||
int dnsd_fd;
|
|
||||||
char *newroot;
|
|
||||||
char *username;
|
|
||||||
char *device;
|
|
||||||
int foreground;
|
|
||||||
int mtu;
|
|
||||||
struct passwd *pw;
|
|
||||||
in_addr_t listen_ip;
|
in_addr_t listen_ip;
|
||||||
|
struct passwd *pw;
|
||||||
|
int foreground;
|
||||||
|
char *username;
|
||||||
|
char *newroot;
|
||||||
|
char *device;
|
||||||
|
int dnsd_fd;
|
||||||
|
int tun_fd;
|
||||||
|
int choice;
|
||||||
int port;
|
int port;
|
||||||
|
int mtu;
|
||||||
|
|
||||||
username = NULL;
|
username = NULL;
|
||||||
newroot = NULL;
|
newroot = NULL;
|
||||||
@ -473,7 +473,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
b32 = get_base32_encoder();
|
b32 = get_base32_encoder();
|
||||||
|
|
||||||
memset(password, 0, 33);
|
memset(password, 0, sizeof(password));
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "vfhu:t:d:m:l:p:P:")) != -1) {
|
while ((choice = getopt(argc, argv, "vfhu:t:d:m:l:p:P:")) != -1) {
|
||||||
@ -512,6 +512,9 @@ main(int argc, char **argv)
|
|||||||
case 'P':
|
case 'P':
|
||||||
strncpy(password, optarg, 32);
|
strncpy(password, optarg, 32);
|
||||||
password[32] = 0;
|
password[32] = 0;
|
||||||
|
|
||||||
|
/* XXX: find better way of cleaning up ps(1) */
|
||||||
|
memset(optarg, 0, strlen(optarg));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
|
Loading…
Reference in New Issue
Block a user