search for: argv0

Displaying 20 results from an estimated 101 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 */
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...
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
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; + } + } +...
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...
2008 Oct 21
1
Create user home directory or user-own folder on samba server on first login to samba
Hello, I'd like to create user home directory or user-own folder on samba server on first login to samba without using PAM, so how could I do this? Thank you, Denis
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...> >> - "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...
2016 Oct 19
3
IntrusiveRefCntPtr vs std::shared_ptr
why llvm contains IntrusiveRefCntPtr instead of using only std::shared_ptr? IntrusiveRefCntPtr widely used in llvm and clang source code. Due to better performance? for example in main func of clang frontend: int cc1_main(ArrayRef<const char *> Argv, const char *Argv0, void *MainAddr) { ensureSufficientStack(); std::unique_ptr<CompilerInstance> Clang(new CompilerInstance()); IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions(); --  Best wishes, Ivan Kus...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...ed 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...
2009 Jul 02
2
[LLVMdev] llvmc for PIC16
...at 7:02 PM, Sanjiv Gupta<sanjiv.gupta at microchip.com> wrote: > I found out the problem. Looks like I can not rely on argv[0] to contain the > full path of the executable always. Yeah, that's what I was thinking. > Can I rely on: > static Path GetMainExecutable(const char *argv0, void *MainAddr); Clang relies on it. According to http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp MainAddr can be any symbol in the binary. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
2020 May 19
1
[PATCH nbdkit] sh: Don't need to cast parameter of ascii_is* to (unsigned char).
...786fdc92b290a7d47e4b003bd84fec69. --- plugins/sh/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sh/call.c b/plugins/sh/call.c index b2d4a794..741022b6 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -443,7 +443,7 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) } if (skip && ebuf[skip]) { - if (!ascii_isspace ((unsigned char) ebuf[skip])) { + if (!ascii_isspace (ebuf[skip])) { /* Treat 'EINVALID' as EIO, not EINVAL */ err = EIO; skip = 0; @@ -451,7 +451,7 @@ handle_script_error (c...