#2 Fix slog bug
Merged 2 years ago by dcavalca. Opened 2 years ago by kentpeacock.
rpms/ kentpeacock/openssh c9s-sig-hyperscale-meta  into  c9s-sig-hyperscale

file modified
+5 -5
@@ -1,7 +1,8 @@ 

- diff --git a/session.c b/session.c

- --- a/session.c

+ Index: b/session.c

+ ===================================================================

+ --- b.orig/session.c

  +++ b/session.c

- @@ -2106,16 +2106,16 @@

+ @@ -2206,7 +2206,7 @@ session_env_req(struct ssh *ssh, Session

   

   	for (i = 0; i < options.num_accept_env; i++) {

   		if (match_pattern(name, options.accept_env[i])) {
@@ -10,8 +11,7 @@ 

   			s->env = xrecallocarray(s->env, s->num_env,

   			    s->num_env + 1, sizeof(*s->env));

   			s->env[s->num_env].name = name;

-  			s->env[s->num_env].val = val;

-  			s->num_env++;

+ @@ -2215,7 +2215,7 @@ session_env_req(struct ssh *ssh, Session

   			return (1);

   		}

   	}

@@ -1,5 +1,6 @@ 

- diff --git a/session.c b/session.c

- --- a/session.c

+ Index: b/session.c

+ ===================================================================

+ --- b.orig/session.c

  +++ b/session.c

  @@ -98,6 +98,7 @@

   #include "atomicio.h"
@@ -9,7 +10,7 @@ 

   

   #if defined(KRB5) && defined(USE_AFS)

   #include <kafs.h>

- @@ -990,11 +991,18 @@

+ @@ -1054,11 +1055,18 @@ copy_environment(char **source, char ***

   static char **

   do_setup_env(struct ssh *ssh, Session *s, const char *shell)

   {
@@ -29,7 +30,7 @@ 

   #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN)

   	char *path = NULL;

   #endif

- @@ -1188,9 +1196,57 @@

+ @@ -1255,9 +1263,57 @@ do_setup_env(struct ssh *ssh, Session *s

   		child_set_env(&env, &envsize, "SSH_USER_AUTH", auth_info_file);

   	if (s->ttyfd != -1)

   		child_set_env(&env, &envsize, "SSH_TTY", s->tty);
@@ -88,8 +89,8 @@ 

   

   	if (debug_flag) {

   		/* dump the environment */

- diff --git a/regress/cert-princ-env.sh b/regress/cert-princ-env.sh

- new file mode 100644

+ Index: b/regress/cert-princ-env.sh

+ ===================================================================

  --- /dev/null

  +++ b/regress/cert-princ-env.sh

  @@ -0,0 +1,129 @@

file modified
+2 -2
@@ -671,7 +671,7 @@ 

   		break;

   

  +	case sLogFormatPrefix:

- +		arg = strdelim(&str);

+ +		arg = argv_next(&ac, &av);

  +		if (!arg || *arg == '\0') {

  +			fatal("%.200s line %d: invalid log format prefix",

  +			    filename, linenum);
@@ -680,7 +680,7 @@ 

  +		break;

  +

  +	case sLogFormatKeys:

- +		while ((arg = strdelim(&str)) && *arg != '\0') {

+ +		while ((arg = argv_next(&ac, &av)) && *arg != '\0') {

  +			if (options->num_log_format_keys >= MAX_LOGFORMAT_KEYS)

  +				fatal("%s line %d: too long format keys.",

  +				    filename, linenum);

Fix slog parsing bug. Also "refresh" patches using quilt to remove offset errors.

Pull-Request has been merged by dcavalca

2 years ago