Displaying 20 results from an estimated 107 matches for "argv0".
Did you mean:
argv
2001 Sep 13
4
ssh argv[0] support
Right - I know you've had a discussion about the argv[0] stuff
already, but I've written this simple script to simulate the (now
missing) support for Debian, and was asked to send it to you...
--- ssh-argv0 ---
#! /bin/sh -e
if [ "${0##*/}" == "ssh-argv0" ]
then
echo 'ssh-argv0: This script should not be run like this, see
ssh-argv0(1) for details' 1>&2;
exit 1;
fi
ssh "${0##*/}" "$@"
------ end ------
-- ssh-argv0.1 --
.Dd September 7, 2001...
2015 Feb 24
4
Current 6.8 git build issues on HP-UX
...0644
--- 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"); /* XXX */
p = strrchr(argv0, '/');
@@ -57,9 +54,12 @@ char *ssh_get_progname(char *argv0)
p =...
2016 Mar 28
2
Is it possible to extend log message?
...d;
}
-#define 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,...
1997 Jul 17
0
KSR[T] Advisory #2: ld.so
...Things to be loaded before the libs. */
-char *_dl_progname = "/lib/ld-linux.so.1";
+char *_dl_progname = ELF_LDSO_IMAGE;
static char * _dl_not_lazy = 0;
static char * _dl_warn = 0; /* Used by ldd */
static char * _dl_trace_loaded_objects = 0;
@@ -165,6 +167,45 @@
#endif
/*
+ * Stop argv0 overflowing vsprintf, but also try to stop false positives
+ * We obey the following rule
+ *
+ * If namesize < 256 keep
+ * If name from last / < 256 use that
+ * else use ELF_LDSO_IMAGE
+ *
+ * This ensures /very/long/stupid/nfs/path/we/often/get/foobarcmd
+ * comes out at least as.
+ *
+...
2024 Jan 14
2
ProxyJump may construct erroneous ProxyCommand
...sh. We could do
something like this:
diff --git a/ssh.c b/ssh.c
index 48d93ddf2..7cd498f84 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1313,7 +1313,7 @@ main(int ac, char **av)
* Try to use SSH indicated by argv[0], but fall back to
* "ssh" if it appears unavailable.
*/
- if (strchr(argv0, '/') != NULL && access(argv0, X_OK) != 0)
+ if (access(argv0, X_OK) != 0)
sshbin = "ssh";
/* Consistency check */
2025 Jan 15
2
new release 3.4.0 - critical security release
...at lists.samba.org
Subject: RE: new release 3.4.0 - critical security release
Here is my fix for the situation:
diff --git a/popt/findme.c b/popt/findme.c
index ac4cbae..4fe8a18 100644
--- a/popt/findme.c
+++ b/popt/findme.c
@@ -25,12 +25,23 @@ const char * findProgramPath(const char * argv0)
if (path == NULL) return NULL;
bufsize = strlen(path) + 1;
+#if defined __TANDEM
+ start = pathbuf = malloc(bufsize);
+#else
start = pathbuf = alloca(bufsize);
+#endif
if (pathbuf == NULL) return NULL; /* XXX can't happen */
strlcpy(pathbuf, path, bufsi...
2025 Jan 14
1
new release 3.4.0 - critical security release
Here is my fix for the situation:
diff --git a/popt/findme.c b/popt/findme.c
index ac4cbae..4fe8a18 100644
--- a/popt/findme.c
+++ b/popt/findme.c
@@ -25,12 +25,23 @@ const char * findProgramPath(const char * argv0)
if (path == NULL) return NULL;
bufsize = strlen(path) + 1;
+#if defined __TANDEM
+ start = pathbuf = malloc(bufsize);
+#else
start = pathbuf = alloca(bufsize);
+#endif
if (pathbuf == NULL) return NULL; /* XXX can't happen */
strlcpy(pathbuf, path, bufsi...
2025 Jan 15
1
new release 3.4.0 - critical security release
...se
>
>
>
> Here is my fix for the situation:
>
>
>
> *diff --git a/popt/findme.c b/popt/findme.c*
>
> *index ac4cbae..4fe8a18 100644*
>
> *--- a/popt/findme.c*
>
> *+++ b/popt/findme.c*
>
> @@ -25,12 +25,23 @@ const char * findProgramPath(const char * argv0)
>
> if (path == NULL) return NULL;
>
>
>
> bufsize = strlen(path) + 1;
>
> +#if defined __TANDEM
>
> + start = pathbuf = malloc(bufsize);
>
> +#else
>
> start = pathbuf = alloca(bufsize);
>
> +#endif
>
> if (pathbuf == NU...
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
2015 Feb 24
2
Current 6.8 git build issues on HP-UX
...d-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"); /* XXX */
> p = strrchr(argv0, '/...
2024 Apr 25
1
[PATCH] Enable ssh_config to set LogPath option (-E)
...1f4..f38c96f7d 100644
--- a/ssh.c
+++ b/ssh.c
@@ -670,7 +670,7 @@ main(int ac, char **av)
struct ssh *ssh = NULL;
int i, r, opt, exit_status, use_syslog, direct, timeout_ms;
int was_addr, config_test = 0, opt_terminated = 0, want_final_pass = 0;
- char *p, *cp, *line, *argv0, *logfile;
+ char *p, *cp, *line, *argv0;
char cname[NI_MAXHOST], thishost[NI_MAXHOST];
struct stat st;
struct passwd *pw;
@@ -741,7 +741,6 @@ main(int ac, char **av)
/* Parse command-line arguments. */
host = NULL;
use_syslog = 0;
- logfi...
2025 Jan 15
1
new release 3.4.0 - critical security release
...tuation:
>>
>>
>>
>> *diff --git a/popt/findme.c b/popt/findme.c*
>>
>> *index ac4cbae..4fe8a18 100644*
>>
>> *--- a/popt/findme.c*
>>
>> *+++ b/popt/findme.c*
>>
>> @@ -25,12 +25,23 @@ const char * findProgramPath(const char * argv0)
>>
>> if (path == NULL) return NULL;
>>
>>
>>
>> bufsize = strlen(path) + 1;
>>
>> +#if defined __TANDEM
>>
>> + start = pathbuf = malloc(bufsize);
>>
>> +#else
>>
>> start = pathbuf = alloca(bufs...
1997 Jul 18
2
URGENT: Update to ld.so advisory
Update to KSR[T] Advisory #002
Our advisory contained one serious piece of mis-information. The latest
version of ld.so that we tested (1.9.2) still appeared to be
vulnerable to this overflow.
We strongly recommend that anyone running linux install the patch
distributed with the advisory, or wait for your vendor to release
an updated ld.so package and install that as soon as possible.
The
2025 Jan 15
1
new release 3.4.0 - critical security release
...ists.samba.org>
Subject: RE: new release 3.4.0 - critical security release
Here is my fix for the situation:
diff --git a/popt/findme.c b/popt/findme.c
index ac4cbae..4fe8a18 100644
--- a/popt/findme.c
+++ b/popt/findme.c
@@ -25,12 +25,23 @@ const char * findProgramPath(const char * argv0)
if (path == NULL) return NULL;
bufsize = strlen(path) + 1;
+#if defined __TANDEM
+ start = pathbuf = malloc(bufsize);
+#else
start = pathbuf = alloca(bufsize);
+#endif
if (pathbuf == NULL) return NULL; /* XXX can't happen */
strlcpy(pathbuf, path, bufsi...
2023 Aug 31
2
[PATCH nbdkit] sh: In pwrite, allow scripts to ignore stdin
...write to script failed because of a broken pipe: "
- "this can happen if the script exits without "
- "consuming stdin, which usually indicates a bug "
- "in the script",
- argv0);
+ nbdkit_debug ("%s: write: %m (ignored)", argv0);
+ wbuflen = 0; /* discard the rest */
}
- else
+ else {
nbdkit_error ("%s: write: %m", argv0);
- goto error;
+ goto error;
+ }
+ }
+...
2025 Jan 14
1
new release 3.4.0 - critical security release
This happens on NonStop x86 and ia64. I have been building/packaging Rsync for years ? almost a decade in fact. I think this happened once before this year, in fact.
It is equivalent to the more portable malloc/free, which I would prefer to have in this series even if it has to be wrapped in a #if defined (__TANDEM) block.
This call is considered not portable and allocates on the stack
2013 Jan 19
1
error on startup
...39;
-s size QEMU_STACK_SIZE set the stack size to 'size' bytes
-cpu model QEMU_CPU select CPU (-cpu help for list)
-E var=value QEMU_SET_ENV sets targets environment variable (see below)
-U var QEMU_UNSET_ENV unsets targets environment variable (see below)
-0 argv0 QEMU_ARGV0 forces target process argv[0] to be 'argv0'
-r uname QEMU_UNAME set qemu uname release string to 'uname'
-B address QEMU_GUEST_BASE set guest_base address to 'address'
-R size QEMU_RESERVED_VA reserve 'size' bytes for guest...
2024 Jan 14
2
ProxyJump may construct erroneous ProxyCommand
Hello,
On macOS, Terminal?s ?New Remote Connection?? command runs ssh in a new window like this:
login -pfq $USER /usr/bin/ssh $HOST
Here, login executes /usr/bin/ssh with argv[0] set to ?-ssh?.
If $HOST has a ProxyJump configuration, the resulting ProxyCommand is:
-ssh -W '[%h]:%p' $JUMP_HOST
Because of the leading hyphen, this fails to execute. If the user?s shell is zsh, the
2017 Jan 24
2
[Release-testers] [cfe-dev] [4.0.0 Release] Relase Candidate 1 has been tagged
Hi,
Looks ok for native MIPS, I have two failures on debian8:
Failing Tests (2):
XRay-x86_64-linux :: TestCases/Linux/argv0-log-file-name.cc
XRay-x86_64-linux :: TestCases/Linux/fixedsize-logging.cc
I'll investigate these failures. Otherwise looks ok.
I've uploaded the binaries.
9d5a389c20eb5b3071e6a0504b7cf87d clang+llvm-4.0.0-rc1-mipsel-linux-gnu.tar.xz
655f566cd16740aaa542d94bcea18490 clang+llvm-4.0....
2023 Aug 30
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...write to script failed because of a broken pipe: "
- "this can happen if the script exits without "
- "consuming stdin, which usually indicates a bug "
- "in the script",
- argv0);
+ *pipe_full = true;
+ r = wbuflen;
}
else
nbdkit_error ("%s: write: %m", argv0);
@@ -555,7 +550,7 @@ call (const char **argv)
CLEANUP_FREE_STRING string rbuf = empty_vector;
CLEANUP_FREE_STRING string ebuf = empty_vector;
- r = cal...