PLEASE TEST snapshots

Chris Adams cmadams at hiwaay.net
Fri Apr 12 04:53:14 EST 2002


Once upon a time, Kevin Steves <kevin at atomicgears.com> said:
> On Tue, 9 Apr 2002, Chris Adams wrote:
> :Here's a patch for a compile bug in SIA support:
> 
> thanks.  can you also try this which has some SIA cleanup?

Yes, this also works okay (against SNAP-20020411, although something
munged some whitespace so I had to apply it manually).  I wrote
auth-sia.c before I had ever heard of the coding standards; I was just
looking at that last week and wondering if I should fix and submit a
patch, but I guess I don't have to know.
-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


> Index: auth-sia.c
> ===================================================================
> RCS file: /var/cvs/openssh/auth-sia.c,v
> retrieving revision 1.5
> diff -u -r1.5 auth-sia.c
> --- auth-sia.c	10 Apr 2002 16:09:52 -0000	1.5
> +++ auth-sia.c	10 Apr 2002 16:29:43 -0000
> @@ -41,7 +41,7 @@
>  		return(0);
> 
>  	if ((ret = sia_ses_authent(NULL, pass, ent)) != SIASUCCESS) {
> -		error("couldn't authenticate %s from %s", user, host);
> +		error("Couldn't authenticate %s from %s", user, host);
>  		if (ret & SIASTOP)
>  			sia_ses_release(&ent);
>  		return(0);
> @@ -55,7 +55,6 @@
>  void
>  session_setup_sia(char *user, char *tty)
>  {
> -	int ret;
>  	struct passwd *pw;
>  	SIAENTITY *ent = NULL;
>  	const char *host;
> @@ -64,46 +63,38 @@
> 
>  	if (sia_ses_init(&ent, saved_argc, saved_argv, host, user, tty, 0,
>  	    NULL) != SIASUCCESS) {
> -		error("sia_ses_init failed");
> -		exit(1);
> +		fatal("sia_ses_init failed");
>  	}
> 
>  	if ((pw = getpwnam(user)) == NULL) {
>  		sia_ses_release(&ent);
> -		error("getpwnam(%s) failed: %s", user, strerror(errno));
> -		exit(1);
> +		fatal("getpwnam: no user: %s", user);
>  	}
>  	if (sia_make_entity_pwd(pw, ent) != SIASUCCESS) {
>  		sia_ses_release(&ent);
> -		error("sia_make_entity_pwd failed");
> -		exit(1);
> +		fatal("sia_make_entity_pwd failed");
>  	}
> 
>  	ent->authtype = SIA_A_NONE;
>  	if (sia_ses_estab(sia_collect_trm, ent) != SIASUCCESS) {
> -		error("couldn't establish session for %s from %s", user,
> +		fatal("Couldn't establish session for %s from %s", user,
>  		    host);
> -		exit(1);
>  	}
> 
>  	if (setpriority(PRIO_PROCESS, 0, 0) == -1) {
>  		sia_ses_release(&ent);
> -		error("setpriority failed: %s", strerror (errno));
> -		exit(1);
> +		fatal("setpriority: %s", strerror (errno));
>  	}
> 
>  	if (sia_ses_launch(sia_collect_trm, ent) != SIASUCCESS) {
> -		error("couldn't launch session for %s from %s", user, host);
> -		exit(1);
> +		fatal("Couldn't launch session for %s from %s", user, host);
>  	}
> 
>  	sia_ses_release(&ent);
> 
>  	if (setreuid(geteuid(), geteuid()) < 0) {
> -		error("setreuid failed: %s", strerror (errno));
> -		exit(1);
> +		fatal("setreuid: %s", strerror(errno));
>  	}
>  }
> 
>  #endif /* HAVE_OSF_SIA */
> -



More information about the openssh-unix-dev mailing list