search for: __progname

Displaying 20 results from an estimated 128 matches for "__progname".

2015 Feb 24
4
Current 6.8 git build issues on HP-UX
...hat will compile: diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 65e8003..40efc87 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -31,8 +31,6 @@ #include <time.h> #include <unistd.h> -#include "xmalloc.h" - #ifndef HAVE___PROGNAME char *__progname; #endif @@ -43,13 +41,12 @@ char *__progname; */ char *ssh_get_progname(char *argv0) { + char *p, *q; #ifdef HAVE___PROGNAME extern char *__progname; - return xstrdup(__progname); + p = progname; #else - char *p; - if (argv0 == NULL) return ("unknown"); /...
2014 Jul 31
0
[PATCH 1/3] __progname is provided by libc
...diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index 88d2812..91f5ae1 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c @@ -76,7 +76,7 @@ static int ai_fam = AF_INET; #define TRIES 6 /* Number of attempts to send each packet */ #define TIMEOUT_LIMIT ((1 << TRIES)-1) -const char *__progname; +const char *tftpd_progname; static int peer; static unsigned long timeout = TIMEOUT; /* Current timeout value */ static unsigned long rexmtval = TIMEOUT; /* Basic timeout value */ @@ -387,9 +387,9 @@ int main(int argc, char **argv) /* basename() is way too much of a pain fro...
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...0:13.000000000 -0500 +++ openssh-3.5p1/log.c 2002-12-18 11:51:24.000000000 -0500 @@ -40,6 +40,7 @@ #include "xmalloc.h" #include <syslog.h> +#include <time.h> static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; @@ -48,6 +49,8 @@ extern char *__progname; +FILE *logf; + /* textual representation of log-facilities/levels */ static struct { @@ -261,7 +264,8 @@ */ void -log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) +log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr, +char *logfile) {...
2000 Nov 05
1
suggested bsd-setproctitle.c
Keven Steves, Can I suggest this minor change. To halt a bit of compiler grumble on BSD4.3 platforms. It's complaining about unsued variable "__progname". I wanted to check with you before committing it incase you had some other plans in mind (and I know how I hate when others break my code =). Thanks, - Ben --- ../openssh/bsd-setproctitle.c Wed Oct 18 08:11:44 2000 +++ bsd-setproctitle.c Sun Nov 5 16:59:07 2000 @@ -56,11 +56,13 @@ #de...
2002 Dec 05
1
patch to add a PAMServiceName config option
I append a patch against openssh-3.5p1.tar.gz which adds a config option PAMServiceName. The option allows one to specify the PAM service at runtime in the config file rather than using __progname or having it hardwired to SSHD_PAM_SERVICE at compile time. I expect this to be useful if one wants to run multiple instances of sshd using different PAM configurations. With this patch SSHD_PAM_SERVICE is not used in auth-pam.c so I moved the definition out of auth-pam.h into servconf.h. Effect...
2000 Oct 30
2
Minor fixes for openssh-SNAP-20001028
...0; diff -urN openssh-snap20001028/log-server.c /projects/encap-src/common/wsg/openssh-snap20001028/log-server.c --- openssh-snap20001028/log-server.c Fri Sep 15 21:29:09 2000 +++ /projects/encap-src/common/wsg/openssh-snap20001028/log-server.c Mon Oct 30 14:42:31 2000 @@ -46,7 +46,7 @@ #ifdef HAVE___PROGNAME extern char *__progname; #else /* HAVE___PROGNAME */ -static const char *__progname = "sshd"; +static const char *__progname = NULL; #endif /* HAVE___PROGNAME */ static LogLevel log_level = SYSLOG_LEVEL_INFO; @@ -118,6 +118,10 @@ exit(1); } log_on_stderr = on_stderr; + if (__...
2018 Nov 19
2
[PATCH] openssl-compat: Test for OpenSSL_add_all_algorithms before using.
OpenSSL 1.1.0 has deprecated this function. --- configure.ac | 1 + openbsd-compat/openssl-compat.c | 2 ++ openbsd-compat/openssl-compat.h | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 3f7fe2cd..db2aade8 100644 --- a/configure.ac +++ b/configure.ac @@ -2710,6 +2710,7 @@ if test "x$openssl" = "xyes" ; then ])
2003 Sep 10
3
[PATCH] No extern declarations of optarg & co if getopt.h is available
...ff -p -u -r1.118 scp.c --- scp.c 21 Aug 2003 23:34:41 -0000 1.118 +++ scp.c 10 Sep 2003 18:59:00 -0000 @@ -219,8 +219,10 @@ main(int argc, char **argv) int ch, fflag, tflag, status; double speed; char *targ, *endp; +#ifndef HAVE_GETOPT_H extern char *optarg; extern int optind; +#endif __progname = ssh_get_progname(argv[0]); Index: sftp.c =================================================================== RCS file: /cvs/openssh_cvs/sftp.c,v retrieving revision 1.38 diff -p -u -r1.38 sftp.c --- sftp.c 21 Aug 2003 23:34:41 -0000 1.38 +++ sftp.c 10 Sep 2003 18:59:00 -0000 @@ -129,8 +129,10 @...
2015 Feb 24
2
Current 6.8 git build issues on HP-UX
...-misc.c b/openbsd-compat/bsd-misc.c > index 65e8003..f7be415 100644 > --- a/openbsd-compat/bsd-misc.c > +++ b/openbsd-compat/bsd-misc.c > @@ -31,8 +31,6 @@ > #include <time.h> > #include <unistd.h> > > -#include "xmalloc.h" > - > #ifndef HAVE___PROGNAME > char *__progname; > #endif > @@ -43,13 +41,12 @@ char *__progname; > */ > char *ssh_get_progname(char *argv0) > { > + char *p, *q; > #ifdef HAVE___PROGNAME > extern char *__progname; > > - return xstrdup(__progname); > + p = __progname; > #else &...
2001 Feb 22
5
PAM Service Name Patch
I've attached a patch relative to OpenSSH 2.5.1p1 which sets the default PAM service name to __progname instead of the hard-coded value "sshd". This allows you to have multiple invokations of sshd under different names, each with its own PAM configuration. Please let me know if you have any questions or problems. -- Mark D. Roth <roth at feep.net> http://www.feep.net/~roth/ ------...
2015 Mar 03
2
openssh-SNAP-20150304 issues
...x2) \ return; \ break; \ default: \ abort(); \ } \ } while (0) extern char *__progname; static int verbose_mode = 0; static int quiet_mode = 0; static char *active_test_name = NULL; static u_int test_number = 0; static test_onerror_func_t *test_onerror = NULL; static void *onerror_ctx = NULL; static const char *data_dir = NULL; static char subtest_info[512]; int main(int argc, char...
2016 Mar 28
2
Is it possible to extend log message?
...MSGBUFSIZ 1024 +#define MSGBUFSIZ 5192 void set_log_handler(log_handler_fn *handler, void *ctx) @@ -448,11 +448,11 @@ do_log(LogLevel level, const char *fmt, va_list args) } else { #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sd - syslog_r(pri, &sdata, "%.500s", fmtbuf); + syslog_r(pri, &sdata, "%s", fmtbuf); closelog_r(&sdata); #else openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility); -...
2015 Feb 24
6
Current 6.8 git build issues on HP-UX
HP-UX 11.23/11.31 build failures OS Build_Target CC OpenSSL BUILD TEST ============== =========================== ================ ============= ====== ================= HP-UX 11.23 ia64-hp-hpux11.23 C/aC++ C.11.23.12 0.9.8zb *F1 HP-UX 11.23 ia64-hp-hpux11.23 gcc 4.3.1 0.9.8zb *F2 HP-UX 11.31 ia64-hp-hpux11.31
2002 Feb 15
3
ssh can't resolve hostnames thru WINS
...option. I found out that some programs now can use NetBIOS names, other can't. openssh falls into latter category :-( I found that openssh use this snippet to convert hostname to ip: if((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) fatal("%s: %.100s: %s", __progname, host, gai_strerror(gaierr)); and it fails for me exactly in this if() when I say "ssh <wins_name>". OTOH, ping uses code similar to struct hostent *hp; hp = gethostbyname(hostname); and this works for WINS names. My openssh version: openssh-3.0.2p1 Will try to patch ss...
2014 Jul 31
5
[PATCH 0/3] tftp-hpa patches from Debian
...d a third one to that yesterday to fix another autoconf build 'race' seen when doing parallel builds. Cheers, Ron Daniel Baumann (1): Update manpage to match source code for --map-file Ron Lee (1): Make configure an order-only prerequisite of aconfig.h.in Thorsten Glaser (1): __progname[] is provided by libc Makefile | 8 ++++++-- tftpd/tftpd.8.in | 6 +++--- tftpd/tftpd.c | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) -- 2.0.0
2007 Nov 11
1
ftp-server patch - restrict user to directory
.../* this will fail if 'newpath' exists */ + ret = symlink(oldpath, newpath); + status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; + } else + status = errno_to_portable(EPERM); + send_status(id, status); xfree(oldpath); xfree(newpath); @@ -1203,7 +1383,7 @@ extern char *__progname; fprintf(stderr, - "usage: %s [-he] [-l log_level] [-f log_facility]\n", __progname); + "usage: %s [-he] [-l log_level] [-F config_file] [-f log_facility]\n", __progname); exit(1); } @@ -1215,6 +1395,7 @@ ssize_t len, olen, set_size; SyslogFacility log_facil...
1999 Nov 23
2
Fixes for Solaris
...====== RCS file: /var/cvs/openssh/ssh-add.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ssh-add.c 1999/11/22 07:11:23 1.11 +++ ssh-add.c 1999/11/23 00:24:32 1.12 @@ -184,8 +184,6 @@ /* check if RSA support exists */ if (rsa_alive() == 0) { - extern char *__progname; - fprintf(stderr, "%s: no RSA support in libssl and libcrypto. See ssl(8).\n", __progname); Index: sshd.c =================================================================== RCS file: /var/cvs/openssh/sshd.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u...
2002 Jun 16
1
multiple definition of `optind'
Any ideas of the best way around this problem? Should I just hack the source code, or is there a magic switch somewhere I'm missing? I'm assuming I can't just dismiss that function as OpenSSH is probably based on the OpenBSD semantics. ============================================================================= gcc -g -O2 -Wall -Wno-uninitialized -I. -I.
2007 Jun 18
0
[PATCH] sftp-server argument error handling
...s a less useful message to stderr and exits. The following patch tidies this up by only printing the more useful error to stderr and not blundering on afterwards. --- sftp-server.c.orig Mon Jun 18 16:37:46 2007 +++ sftp-server.c Mon Jun 18 16:39:14 2007 @@ -1220,7 +1220,8 @@ sanitise_stdfd(); __progname = ssh_get_progname(argv[0]); - log_init(__progname, log_level, log_facility, log_stderr); + /* Send any argument errors to stderr */ + log_init(__progname, log_level, log_facility, 1); while (!skipargs && (ch = getopt(argc, argv, "C:f:l:che")) != -1) { switch (ch) { @@ -1237...
2010 Jan 03
1
tftp-hpa 5.0 fails to build on mips
...f -Wshadow -Wsign-compare -pipe -fno-strict-aliasing -I/build/buildd/tftp-hpa-5.0 -c remap.c gcc -Wl,-z,defs tftpd.o recvfrom.o misc.o remap.o ../common/libcommon.a -lwrap -lnsl /build/buildd/tftp-hpa-5.0/lib/libxtra.a -o tftpd /usr/bin/ld.real: non-dynamic relocations refer to dynamic symbol __progname@@GLIBC_2.0 /usr/bin/ld.real: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status [...] ---snap--- The full buildlogs are available at: https://buildd.debian.org/fetch.cgi?pkg=tftp-hpa;ver=5.0-10;arch=mips;stamp=1261015828 https://buildd.debian.org/fetch.cgi?pkg=tftp-...