search for: saved_argv

Displaying 20 results from an estimated 35 matches for "saved_argv".

2000 Oct 15
1
Patch for Digital Unix SIA authentication
...h-2.2.0p1-dist/auth-sia.c Wed Dec 31 18:00:00 1969 +++ openssh-2.2.0p1/auth-sia.c Sat Oct 14 21:24:19 2000 @@ -0,0 +1,34 @@ +#include "includes.h" + +#ifdef HAVE_OSF_SIA +#include "ssh.h" + +#include <sia.h> +#include <siad.h> + +extern int saved_argc; +extern char **saved_argv; + +int +auth_sia_password (user, pass) + char *user; + char *pass; +{ + SIAENTITY *ent = NULL; + int ret; + + if (sia_ses_init (&ent, saved_argc, saved_argv, + get_canonical_hostname(), user, NULL, 0, NULL) != SIASUCCESS) + return 0; + if ((ret = sia_ses_authent (NULL, pass, ent)) != SIAS...
2003 Apr 02
0
[Bug 529] sshd doesn't work correctly after SIGHUP
...t, key_used = 0; - /* Save argv. */ +#ifdef HAVE_SECUREWARE + (void)set_auth_parameters(ac, av); +#endif + __progname = get_progname(av[0]); + init_rng(); + + /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ + saved_argc = ac; saved_argv = av; + saved_argv = xmalloc(sizeof(*saved_argv) * ac); + for (i = 0; i < ac; i++) + saved_argv[i] = xstrdup(av[i]); + +#ifndef HAVE_SETPROCTITLE ------------------- If sshd uses to reload service after receive SIGHUP, it use execve to start sshd with same parameters,...
2011 Feb 07
1
[PATCH] ssh: set proctitle for mux master
...fds 0, 1 and 2 are open or directed to /dev/null */ - sanitise_stdfd(); - __progname = ssh_get_progname(av[0]); init_rng(); +#ifndef HAVE_SETPROCTITLE + /* Prepare for later setproctitle emulation */ + { + /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ + char **saved_argv = xcalloc(ac + 1, sizeof(*saved_argv)); + for (i = 0; i < ac; i++) + saved_argv[i] = xstrdup(av[i]); + saved_argv[i] = NULL; + compat_init_setproctitle(ac, av); + av = saved_argv; + } +#endif + + /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ + sanitise_stdfd(); + /*...
2001 Feb 12
2
OSF_SIA bug in 2.3.0p1
Is anyone maintaining the OSF_SIA support in openssh? This seems to be an obvious bug triggered if you try to connect as a non-existant user. >From auth1.c line 459 #elif defined(HAVE_OSF_SIA) (sia_validate_user(NULL, saved_argc, saved_argv, get_canonical_hostname(), pw->pw_name, NULL, 0, NULL, "") == SIASUCCESS)) { #else /* !HAVE_OSF_SIA && !USE_PAM */ At this stage pw could be NULL so obviously pw->pw_name isn't a valid thing to do. Should this just be 'user'? I&...
2001 Feb 19
0
Restarting with kill -HUP
Hi, If sshd is started with 'sshd', restarting with kill -HUP will fail. I've included the most obvious patch, but making sure that the full pathname is in saved_argv[0] just might be more secure. Cheers, Han Holl --- sshd.c.orig Mon Feb 19 10:55:54 2001 +++ sshd.c Mon Feb 19 10:56:15 2001 @@ -208,7 +208,7 @@ { log("Received SIGHUP; restarting."); close_listen_socks(); - execv(saved_argv[0], saved_argv); + execvp(saved_argv[0], saved_argv); l...
2006 May 04
2
xmalloc(foo*bar) -> xcalloc(foo, bar) for Portable
....c,v retrieving revision 1.333 diff -u -p -r1.333 sshd.c --- sshd.c 26 Mar 2006 03:24:50 -0000 1.333 +++ sshd.c 4 May 2006 02:01:50 -0000 @@ -921,7 +921,7 @@ main(int ac, char **av) /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ saved_argc = ac; rexec_argc = ac; - saved_argv = xmalloc(sizeof(*saved_argv) * (ac + 1)); + saved_argv = xcalloc(ac + 1, sizeof(*saved_argv)); for (i = 0; i < ac; i++) saved_argv[i] = xstrdup(av[i]); saved_argv[i] = NULL; Index: openbsd-compat/bsd-cygwin_util.c =================================================================== RCS fi...
2000 Oct 07
0
OpenSSH changes for BSD/OS
...w_dir = xstrdup(pw->pw_dir); pwcopy.pw_shell = xstrdup(pw->pw_shell); + #if defined(BSD) && BSD >= 199506 + pwcopy.pw_class = xstrdup(pw->pw_class); + #endif pw = &pwcopy; #ifdef USE_PAM *************** *** 508,514 **** (sia_validate_user(NULL, saved_argc, saved_argv, get_canonical_hostname(), pw->pw_name, NULL, 0, NULL, "") == SIASUCCESS)) { ! #else /* !HAVE_OSF_SIA && !USE_PAM */ auth_password(pw, "")) { #endif /* USE_PAM */ /* Authentication with empty password succeeded. */ --- 529,537 ----...
2001 Dec 19
0
Patch for DU SIA auth
...TITY during ses_launch to fetch krb tickets and afs tokens. diff -c openssh-3.0.2p1/auth-sia.c openssh-3.0.2p1-tschroed/auth-sia.c *** openssh-3.0.2p1/auth-sia.c Mon Apr 16 04:37:05 2001 --- openssh-3.0.2p1-tschroed/auth-sia.c Thu Dec 6 13:02:26 2001 *************** *** 21,32 **** extern char **saved_argv; extern int errno; int auth_sia_password(char *user, char *pass) { int ret; - SIAENTITY *ent = NULL; const char *host; host = get_canonical_hostname(options.reverse_mapping_check); --- 21,32 ---- extern char **saved_argv; extern int errno; + SIAENTITY *__sia_ent =...
2002 Sep 04
2
uid transition and post-auth privsep (WAS Re: possible fundamental problem with tru64 patch) (fwd)
...atch a try. Thanks, Toni > diff -urN openssh-SNAP-20020826/auth-sia.c openssh/auth-sia.c > --- openssh-SNAP-20020826/auth-sia.c Fri Apr 12 10:36:08 2002 > +++ openssh/auth-sia.c Tue Sep 3 22:03:16 2002 > @@ -45,27 +45,25 @@ > extern int saved_argc; > extern char **saved_argv; > > -extern int errno; > - > int > auth_sia_password(Authctxt *authctxt, char *pass) > { > int ret; > SIAENTITY *ent = NULL; > const char *host; > - char *user = authctxt->user; > > host = get_canonical_hostname(options....
2003 Feb 27
0
Update for Tru64 Unix
...ling privsep will require 1 additional process per login session. diff -urN openssh-SNAP-20030226/auth-sia.c openssh/auth-sia.c --- openssh-SNAP-20030226/auth-sia.c Tue Jan 21 22:42:27 2003 +++ openssh/auth-sia.c Wed Feb 26 19:46:17 2003 @@ -45,27 +45,25 @@ extern int saved_argc; extern char **saved_argv; -extern int errno; - int auth_sia_password(Authctxt *authctxt, char *pass) { int ret; SIAENTITY *ent = NULL; const char *host; - char *user = authctxt->user; host = get_canonical_hostname(options.verify_reverse_mapping); - if (pass[0] == '\0') + if (!authctxt->user |...
2007 Jan 25
0
sshd unhandled SIGALRM
...revision 1.345 diff -u -r1.345 sshd.c --- sshd.c 24 Jul 2006 04:51:01 -0000 1.345 +++ sshd.c 3 Aug 2006 06:13:53 -0000 @@ -291,6 +291,7 @@ logit("Received SIGHUP; restarting."); close_listen_socks(); close_startup_pipes(); + alarm(0); /* alarm timer persists across exec */ execv(saved_argv[0], saved_argv); logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], strerror(errno));
2007 Feb 21
0
sshd unhandled SIGALRM (resend)
...-p -r1.361 sshd.c --- sshd.c 7 Nov 2006 12:14:42 -0000 1.361 +++ sshd.c 21 Feb 2007 06:37:18 -0000 @@ -305,6 +305,7 @@ sighup_restart(void) logit("Received SIGHUP; restarting."); close_listen_socks(); close_startup_pipes(); + alarm(0); /* alarm timer persists across exec */ execv(saved_argv[0], saved_argv); logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], strerror(errno));
2003 Sep 16
1
SIGHUP fails to restart (3.6.1p2 -> 3.7p1)
...============================================= /* * Called from the main program after receiving SIGHUP. * Restarts the server. */ static void sighup_restart(void) { logit("Received SIGHUP; restarting."); close_listen_socks(); close_startup_pipes(); execv(saved_argv[0], saved_argv); logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], strerror(errno)); exit(1); } ============================================================================= The process is now gone. After coming back in via my bac...
2003 Sep 24
1
Patches for compatibility with Heimdal's libsia_krb5 SIA module
...h-3.7.1p2/auth-sia.c Wed Sep 24 00:05:39 2003 @@ -31,6 +31,7 @@ #include "log.h" #include "servconf.h" #include "canohost.h" +#include "xmalloc.h" #include <sia.h> #include <siad.h> @@ -45,11 +46,12 @@ extern int saved_argc; extern char **saved_argv; +static SIAENTITY *ent = NULL; + int auth_sia_password(Authctxt *authctxt, char *pass) { int ret; - SIAENTITY *ent = NULL; const char *host; host = get_canonical_hostname(options.use_dns); @@ -57,6 +59,12 @@ if (!authctxt->user || pass == NULL || pass[0] == '\0') retur...
2011 Mar 28
15
[Bug 1883] New: use setproctitle for persistent mux master
https://bugzilla.mindrot.org/show_bug.cgi?id=1883 Summary: use setproctitle for persistent mux master Product: Portable OpenSSH Version: 5.8p1 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: ssh AssignedTo: unassigned-bugs at mindrot.org ReportedBy:
2001 Feb 16
1
OpenSSH 2.3.0p1 port to BSDI BSD/OS
...{ + char *p; + bsduser = xstrdup(user); + if ((p = strchr(user, ':')) != NULL) + *p = '\0'; + } +#endif pw = getpwnam(user); if (pw && allowed_user(pw)) { /* Take a copy of the returned structure. */ @@ -460,7 +482,9 @@ (sia_validate_user(NULL, saved_argc, saved_argv, get_canonical_hostname(), pw->pw_name, NULL, 0, NULL, "") == SIASUCCESS)) { -#else /* !HAVE_OSF_SIA && !USE_PAM */ +#elif defined(HAVE_BSD_AUTH_H) + auth_userokay(bsduser, NULL, "auth-ssh", "" )) { +#else /* !HAVE_OSF_SIA && !USE_PAM...
2000 Jul 05
0
openssh compile error on TRU64 4.0D
L.S We have a problem compiling the latest ssh (openssh2.1.1p2) on TRU64 Unix 4.0D we got the following error message ... auth1.c:507: `saved_argv' undeclared (first use in this function) .... auth1.c:509: warning: passing arg 4 of `sia_validate_user' discards qualifiers from pointer target type *** Exit 1 where line 509 ===> (sia_validate_user(NULL, saved_argc, saved_argv, get_canonical_hostname(), pw->pw_name, N...
2001 Mar 01
1
Bug report against openssh-2.3.0p1
...2001 *************** *** 455,461 **** (!options.kerberos_authentication || options.kerberos_or_local_passwd) && #endif /* KRB4 */ #ifdef USE_PAM ! auth_pam_password(pw, "")) { #elif defined(HAVE_OSF_SIA) (sia_validate_user(NULL, saved_argc, saved_argv, get_canonical_hostname(), pw->pw_name, NULL, 0, --- 455,461 ---- (!options.kerberos_authentication || options.kerberos_or_local_passwd) && #endif /* KRB4 */ #ifdef USE_PAM ! auth_pam_password(pw, "") && do_pam_account(pw->pw_nam...
2005 Jan 12
1
sshd runs with -R flag?
...I cannot guess at its purpose: "sshd.c" line 1195 of 2021: ... if (rexec_flag) { rexec_argv = xmalloc(sizeof(char *) * (rexec_argc + 2)); for (i = 0; i < rexec_argc; i++) { debug("rexec_argv[%d]='%s'", i, saved_argv[i]); rexec_argv[i] = saved_argv[i]; } rexec_argv[rexec_argc] = "-R"; rexec_argv[rexec_argc + 1] = NULL; } ... I'm running this on Solaris 9, to be exact: bash-3.00# uname -a SunOS chamonix 5.9 Generic_117...
2000 Aug 27
0
patch for TIS (skey/opie) *and* passwd auth via PAM
...6,7 @@ #ifdef USE_PAM /* Do PAM auth with password */ - authenticated = auth_pam_password(pw, password); + authenticated = auth_pam_password(pw, password, SSH_CMSG_AUTH_PASSWORD); #elif defined(HAVE_OSF_SIA) /* Do SIA auth with password */ if (sia_validate_user(NULL, saved_argc, saved_argv, @@ -355,6 +364,26 @@ xfree(response); } break; +#elif defined(PAM_TIS) + case SSH_CMSG_AUTH_TIS: + debug("rcvd SSH_CMSG_AUTH_TIS"); + if (!options.tis_authentication) { + verbose("TIS authentication disabled."); + break; + } + a...