search for: read_config_file

Displaying 20 results from an estimated 30 matches for "read_config_file".

2010 Jul 14
2
[PATCH] gfxboot: add include and menu include support
...34,6 +134,7 @@ gfx_menu_t gfx_menu; menu_t *menu; menu_t *menu_default; +static menu_t *menu_ptr, **menu_next; struct { uint32_t jmp_table[12]; @@ -161,7 +162,7 @@ char *get_config_file_name(void); char *skip_spaces(char *s); char *skip_nonspaces(char *s); void chop_line(char *s); -int read_config_file(void); +int read_config_file(const char *filename); unsigned magic_ok(unsigned char *buf, unsigned *code_size); unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, unsigned *file_len, unsigned *code_size); int gfx_init(char *file); @@ -219,7 +220,7 @@ int main(int argc...
2004 Apr 19
1
Possible typo?
...oted something which looks bogus to me: diff -u -r1.209 -r1.210 --- src/usr.bin/ssh/ssh.c 2004/03/11 10:21:17 1.209 +++ src/usr.bin/ssh/ssh.c 2004/04/18 23:10:26 1.210 @@ -517,16 +517,17 @@ * file if the user specifies a config file on the command line. */ if (config != NULL) { - if (!read_config_file(config, host, &options)) + if (!read_config_file(config, host, &options, 0), 0) fatal("Can't open user config file %.100s: " The line if (!read_config_file(config, host, &options, 0), 0) seem so have one ", 0" too many, is this really intended or is this a...
2024 May 06
1
Feature request/EOI: Match interactive config?
....c index 3a64a0441..dff6a9df6 100644 --- a/readconf.c +++ b/readconf.c @@ -70,6 +70,7 @@ #include "uidswap.h" #include "myproposal.h" #include "digest.h" +#include "sshbuf.h" /* Format of the configuration file: @@ -133,11 +134,11 @@ */ static int read_config_file_depth(const char *filename, struct passwd *pw, - const char *host, const char *original_host, Options *options, - int flags, int *activep, int *want_final_pass, int depth); + const char *host, const char *original_host, struct sshbuf *remote_command, + Options *options, int flags, int *...
2010 Sep 03
1
[PATCH] New '-o' option to configure server or hosts from command line
...; + cfg->variable = xstrdup(variable); + cfg->value = xstrdup(value); + cfg->file = fname ? xstrdup(fname) : NULL; + cfg->line = lineno; + + return cfg; +} + /* Parse a configuration file and put the results in the configuration tree starting at *base. @@ -241,9 +287,7 @@ bool read_config_file(avl_tree_t *config_tree, const char *fname) { FILE *fp; char buffer[MAX_STRING_SIZE]; char *line; - char *variable, *value, *eol; int lineno = 0; - int len; bool ignore = false; config_t *cfg; bool result = false; @@ -280,34 +324,9 @@ bool read_config_file(avl_tree_t *config_t...
2024 May 06
1
Feature request/EOI: Match interactive config?
....c index 3a64a0441..dff6a9df6 100644 --- a/readconf.c +++ b/readconf.c @@ -70,6 +70,7 @@ #include "uidswap.h" #include "myproposal.h" #include "digest.h" +#include "sshbuf.h" /* Format of the configuration file: @@ -133,11 +134,11 @@ */ static int read_config_file_depth(const char *filename, struct passwd *pw, - const char *host, const char *original_host, Options *options, - int flags, int *activep, int *want_final_pass, int depth); + const char *host, const char *original_host, struct sshbuf *remote_command, + Options *options, int flags, int *...
2024 May 06
1
Feature request/EOI: Match interactive config?
... and I guess your next question will be about compilation environment, so: ``` $ gcc --version gcc (Gentoo 13.2.1_p20240210 p14) 13.2.1 20240210 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` I'm running on gentoo. I tested that the
2004 Oct 03
3
[PATCH] PreferAskpass in ssh_config
...+ /* Read options */ + initialize_options(&options); + + pw = getpwuid(original_real_uid = getuid()); + if (!pw) { + logit("You don't exist, go away!"); + exit(1); + } + + snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, + _PATH_SSH_USER_CONFFILE); + (void)read_config_file(buf, "", &options, 1); + (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", + &options, 0); + fill_default_options(&options); /* At first, get a connection to the authentication agent. */ ac = ssh_get_authentication_connection(); Index: ssh-agent.c ===...
2024 May 06
1
Feature request/EOI: Match interactive config?
...exec/ssh-pkcs11-helper\" -D_PATH_SSH_SK_HELPER=\"/usr/local/libexec/ssh-sk-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c auth2-hostbased.c -o auth2-hostbased.o readconf.c:2431:1: error: conflicting types for ?read_config_file?; have ?int(const char *, struct passwd *, const char *, const char *, Options *, int, int *)? 2431 | read_config_file(const char *filename, struct passwd *pw, const char *host, | ^~~~~~~~~~~~~~~~ readconf.h:245:10: note: previous declaration of ?read_config_file? with type ?int(const char...
2024 May 04
3
Feature request/EOI: Match interactive config?
Hey there, I often want different behavior in my ssh client depending on whether I'm logging into an interactive session or running a remote non-interactive command. We can see at, say, https://unix.stackexchange.com/a/499562/305714 that this isn't a unique wish, and existing solutions are kind of baroque. Typical reasons to do this are to immediately go into a screen or tmux session; for
2016 Aug 29
2
[PATCH] Make "ssh" try different configuration filenames
...canon) fatal("Can't open user config file %.100s: " "%.100s", config, strerror(errno)); } else { - r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir, - _PATH_SSH_USER_CONFFILE); - if (r > 0 && (size_t)r < sizeof(buf)) - (void)read_config_file(buf, pw, host, host_arg, - &options, SSHCONF_CHECKPERM | SSHCONF_USERCONF | - (post_canon ? SSHCONF_POSTCANON : 0)); + version_postfix = strchr(SSH_VERSION, '_'); + if (!version_postfix) + version_postfix = ""; + + /* Find the best fitting config file, + * I...
2009 Feb 02
2
Ticket #282: omindex-assorted-enhancements.patch woes
...to the latest stable version 1.0.10. The patch created a reject file but I edited in the two lines it rejected myself. But when I run "make" I get the following errors: omindex.o: In function `main': /home/frankie/Desktop/xapian-omega-1.0.10/omindex.cc:874: undefined reference to `read_config_file()' /home/frankie/Desktop/xapian-omega-1.0.10/omindex.cc:987: undefined reference to `log_dir' collect2: ld returned 1 exit status Could anyone suggest what I've dome wrong? FYI Here's the reject file: *************** *** 397,406 **** } else if (mimetype == "text/rtf...
2006 Jun 12
0
Active Directory Integration with FreeRADIUS - NTLM_Auth
...try_delay = 5 proxy: retry_count = 3 proxy: synchronous = no proxy: default_fallback = yes proxy: dead_time = 120 proxy: post_proxy_authorize = yes proxy: wake_all_if_all_dead = no security: max_attributes = 200 security: reject_delay = 1 security: status_server = no main: debug_level = 0 read_config_files: reading dictionary read_config_files: reading naslist Using deprecated naslist file. Support for this will go away soon. read_config_files: reading clients read_config_files: reading realms radiusd: entering modules setup Module: Library search path is /usr/lib Module: Loaded exec exec: w...
2015 Nov 15
2
~/.ssh/config permissions
Hi, Working with apache-sshd I found that it forces ~/.ssh/config to be owned by user without group/others permissions. It failed for me within my valid openssh environment. Within sources (readconf.c::read_config_file), I found that openssh only enforces ownership by user and not group/others write. When I opened an issue, I was referred to this[1] wiki page (not sure who maintain it) claiming that: """ This file must not be accessible to other users in any way. Set strict permissions: read/write...
2011 Aug 17
1
[patch 1/1] syslinux: add suport for com32 entries in the menu
...ocal disk + char *com32; // boot other com32 modules char *initrd; // initrd as separate line (instead of as part of 'append') char *append; // kernel args char *ipappend; // append special pxelinux args (see doc) @@ -374,6 +375,11 @@ int read_config_file(const char *filenam continue; } + if(!strcasecmp(s, "com32") && menu_ptr) { + menu_ptr->com32 = strdup(t); + continue; + } + if(!strcasecmp(s, "initrd") && menu_ptr) { menu_ptr->initrd = strdup(t); continue; @...
2001 Apr 12
1
ssh's readconf.c debug() goes to /dev/null
...we are the client all output * actually goes to stderr. */ ==> log_init(av[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); /* Read per-user configuration file. */ snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, _PATH_SSH_USER_CONFFILE); read_config_file(buf, host, &options); /* Read systemwide configuration file. */ read_config_file(_PATH_HOST_CONFIG_FILE, host, &options); /* Fill configuration defaults. */ fill_default_options(&options); /* reinit */ log_init(av[0], options.log_level, SYSLOG_FACILI...
2015 Mar 29
4
Invalid memory access / read stack overflow when reading config with zero bytes
On Mon, 30 Mar 2015 09:19:02 +1100 (AEDT) Damien Miller <djm at mindrot.org> wrote: > What version of OpenSSH is this? 6.8 portable on Linux. > Also, when reporting fuzzer-derived problems it really helps to > include the test-case. The "test case" is a one byte file containing a zero byte. But here it is :-) -- Hanno B?ck http://hboeck.de/ mail/jabber: hanno at
2010 Apr 09
2
[PATCH] gfxboot: support MENU LABEL statement
...d boot(void); +void boot(int index); void boot_entry(menu_t *menu_ptr, char *arg); @@ -234,7 +234,7 @@ int main(int argc, char **argv) } // does not return if it succeeds - boot(); + boot(menu_index); } if(argc > 2) show_message(argv[2]); @@ -321,19 +321,19 @@ int read_config_file(void) if(*t) *t++ = 0; t = skip_spaces(t); - if(!strcmp(s, "timeout")) { + if(!strcasecmp(s, "timeout")) { timeout = atoi(t); continue; } - if(!strcmp(s, "default")) { + if(!strcasecmp(s, "default")) { m...
2003 Jan 18
0
[Patch] User-dependent IdentityFile
...L) @@ -750,6 +781,7 @@ struct stat st; int opt, type, fd, download = 0; FILE *f; + char buf[256]; extern int optind; extern char *optarg; @@ -767,6 +799,13 @@ exit(1); } + snprintf(buf, sizeof buf, "%.100s/%.100s", pw->pw_dir, + _PATH_SSH_USER_CONFFILE); + (void)read_config_file(buf, hostname, &options); + + /* Read systemwide configuration file after user config. */ + (void)read_config_file(_PATH_HOST_CONFIG_FILE, hostname, &options); + while ((opt = getopt(ac, av, "deiqpclBRxXyb:f:t:U:D:P:N:C:")) != -1) { switch (opt) { case 'b': d...
2011 Jan 07
1
[RFC/PATCH] ssh: config directive to modify the local environment
...s line %d: Bad env mod specification.", + filename, linenum); + + if (*activep) { + add_local_env_mod(options, &mod); + } + break; + case oDeprecated: debug("%s line %d: Deprecated option \"%s\"", filename, linenum, keyword); @@ -1034,6 +1089,7 @@ read_config_file(const char *filename, const char *host, Options *options, char line[1024]; int active, linenum; int bad_options = 0; + int prev_num_local_env_mods = options->num_local_env_mods; if ((f = fopen(filename, "r")) == NULL) return 0; @@ -1066,6 +1122,36 @@ read_config_file(const...
2015 Jul 02
1
[PATCH 1/2] (read|append)_config_file: log open errors as LOG_DEBUG
...ages. This commit changes the log level to LOG_DEBUG so syslog doesn't get filled by default. --- src/conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf.c b/src/conf.c index 2b32359..7756247 100644 --- a/src/conf.c +++ b/src/conf.c @@ -298,7 +298,7 @@ bool read_config_file(splay_tree_t *config_tree, const char *fname) { fp = fopen(fname, "r"); if(!fp) { - logger(DEBUG_ALWAYS, LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno)); + logger(DEBUG_ALWAYS, LOG_DEBUG, "Cannot open config file %s: %s", fname, strerror(errn...