[PATCH] in sshd make some global variables static.

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 




I think in sshd.c a bunch of global variables could be made static.


Three of them could even be easily moved into main() as normal variables: test_flag, inetd_flag, no_daemon_flag.

Instead of a patch, here is merely a list, because I'm not sure if you really want to do this and/or if you want to transfer the the comments for the test_flag, inetd_flag, no_deamon_flag into main as well.


All of these can be made static.
The first three can be moved to main() as normal variables.


Tested on openssh 7.9 portable.

 static int test_flag = 0;  /* XXX move to main() */
 static int inetd_flag = 0;  /* XXX move to main() */
 static int no_daemon_flag = 0;  /* XXX move to main() */

 static int log_stderr = 0;
 static char **saved_argv;
 static int saved_argc;
 static int rexeced_flag = 0;
 static int rexec_flag = 1;
 static int rexec_argc = 0;
 static char **rexec_argv;
 static int listen_socks[MAX_LISTEN_SOCKS];
 static int num_listen_socks = 0;
 static int have_agent = 0;
 static int *startup_pipes = NULL;
 static int startup_pipe;




Markus

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux