Deleted Added
full compact
15,16c15,16
< RCSID("$FreeBSD: head/crypto/openssh/readconf.c 128461 2004-04-20 09:47:13Z des $");
< RCSID("$OpenBSD: readconf.c,v 1.127 2003/12/16 15:49:51 markus Exp $");
---
> RCSID("$OpenBSD: readconf.c,v 1.134 2004/07/11 17:48:47 deraadt Exp $");
> RCSID("$FreeBSD: head/crypto/openssh/readconf.c 137019 2004-10-28 16:11:31Z des $");
109a110
> oSendEnv, oControlPath, oControlMaster,
197a199,201
> { "sendenv", oSendEnv },
> { "controlpath", oControlPath },
> { "controlmaster", oControlMaster },
754a759,779
> case oSendEnv:
> while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
> if (strchr(arg, '=') != NULL)
> fatal("%s line %d: Invalid environment name.",
> filename, linenum);
> if (options->num_send_env >= MAX_SEND_ENV)
> fatal("%s line %d: too many send env.",
> filename, linenum);
> options->send_env[options->num_send_env++] =
> xstrdup(arg);
> }
> break;
>
> case oControlPath:
> charptr = &options->control_path;
> goto parse_string;
>
> case oControlMaster:
> intptr = &options->control_master;
> goto parse_yesnoask;
>
792c817,818
< read_config_file(const char *filename, const char *host, Options *options)
---
> read_config_file(const char *filename, const char *host, Options *options,
> int checkperm)
800,801c826
< f = fopen(filename, "r");
< if (!f)
---
> if ((f = fopen(filename, "r")) == NULL)
803a829,838
> if (checkperm) {
> struct stat sb;
>
> if (fstat(fileno(f), &sb) == -1)
> fatal("fstat %s: %s", filename, strerror(errno));
> if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
> (sb.st_mode & 022) != 0))
> fatal("Bad owner or permissions on %s", filename);
> }
>
891a927,929
> options->num_send_env = 0;
> options->control_path = NULL;
> options->control_master = -1;
1011a1050,1051
> if (options->control_master == -1)
> options->control_master = 0;