search for: xstrdup

Displaying 20 results from an estimated 264 matches for "xstrdup".

Did you mean: strdup
2010 Mar 23
5
[Bug 1738] New: openbsd-compat wants xstrdup but it's in libssh.a
https://bugzilla.mindrot.org/show_bug.cgi?id=1738 Summary: openbsd-compat wants xstrdup but it's in libssh.a Product: Portable OpenSSH Version: 5.4p1 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Build system AssignedTo: unassigned-bugs at mindrot.org...
2000 Oct 07
0
OpenSSH changes for BSD/OS
...ted = auth_password(pw, password); #endif /* USE_PAM */ *************** *** 469,474 **** --- 478,492 ---- #endif /* AFS */ /* Verify that the user is a valid user. */ + #ifdef HAVE_BSD_AUTH + /* we may have an auth type in the user name we need to strip */ + { + char *p; + bsduser = xstrdup(user); + if ((p = strchr(user, ':')) != NULL) + *p = '\0'; + } + #endif pw = getpwnam(user); if (!pw || !allowed_user(pw)) do_fake_authloop1(user); *************** *** 482,487 **** --- 500,508 ---- pwcopy.pw_gid = pw->pw_gid; pwcopy.pw_dir = xstrdup(pw->p...
2015 Feb 24
4
Current 6.8 git build issues on HP-UX
On Wed, Feb 25, 2015 at 09:04:57AM +1100, Darren Tucker wrote: > On Tue, Feb 24, 2015 at 12:11:16PM -0800, Kevin Brott wrote: > > ld: Unsatisfied symbol "xstrdup" in file > > openbsd-compat//libopenbsd-compat.a[bsd-misc.o] > > How about removing the dependency on xmalloc? eg (untested): Shoulda tested it. Now one that will compile: diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 65e8003..40efc87 100644 --- a/op...
2010 Sep 03
1
[PATCH] New '-o' option to configure server or hosts from command line
...name) + logger(LOG_ERR, "%s `%s' on line %d while reading config file %s", + err, variable, lineno, fname); + else + logger(LOG_ERR, "%s `%s' in command line option %d", + err, variable, lineno); + return NULL; + } + + cfg = new_config(); + 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 *c...
2005 May 28
1
[Bug 1048] scp.c xstrdup() memory leak?
http://bugzilla.mindrot.org/show_bug.cgi?id=1048 Summary: scp.c xstrdup() memory leak? Product: Portable OpenSSH Version: 4.1p1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: scp AssignedTo: bitbucket at mindrot.org ReportedBy: flatline a...
2014 Jan 01
0
Soft chroot jail for sftp-server
...t; 85a89,213 > /* Concatenate 2 path parts in a way that one doesn't need to care about leading/trailing slashes. Returned pointer can be freed. */ > static char* concat_path(char* parent, char* child) { > size_t parent_len = strlen(parent); > if (parent_len < 1) > return xstrdup(child); > size_t child_len = strlen(child); > if (child_len < 1) > return xstrdup(parent); > > if (*child == '/') { > child++; > child_len--; > } > > char* cat; > if (*(parent + parent_len - 1) == '/') { > size_t cat_len = siz...
2001 Jun 21
1
pw_expire/pw_change in current portable openssh CVS bombs
The references to pw_expire and pw_change in pwcopy() in misc.c cause compilation errors at least on solaris. How about doing a memcpy of the whole structure and only explicitly setting those that need xstrdup? That would work on openbsd and everywhere else. - Dave Dykstra --- misc.c.O Thu Jun 21 11:35:28 2001 +++ misc.c Thu Jun 21 11:36:09 2001 @@ -125,14 +125,10 @@ { struct passwd *copy = xmalloc(sizeof(*copy)); - memset(copy, 0, sizeof(*copy)); + memcpy(copy, pw, sizeof(*copy)); copy->pw_...
2007 Jun 06
1
Possible error in drivers/main-hal.c
Looking at the above sources, it looks like the device_path is configured twice: 509 device_path = xstrdup("auto"); /*getenv ("HAL_PROP_HIDDEV_DEVICE"); */ 626 device_path = xstrdup(argv[0]); Other than the fact that we leak a few bytes of memory here by using xstrdup() twice without free'ing in between, I don't think this is what we intended to do. It looks to me that the...
2015 Feb 24
6
Current 6.8 git build issues on HP-UX
...gcc/lib -L/usr/lib/hpux32 -L/opt/gtk2.6/lib -lssh -lopenbsd-compat -lssh -lopenbsd-compat -lcrypto -lz -lnsl -lxnet -lsec regress/netcat.c: In function 'socks_connect': regress/netcat.c:1470: warning: 'wlen' may be used uninitialized in this function ld: Unsatisfied symbol "xstrdup" in file openbsd-compat//libopenbsd-compat.a[bsd-misc.o] 1 errors. collect2: ld returned 1 exit status make: *** [regress/netcat] Error 1 -- # include <stddisclaimer.h> /* Kevin Brott <Kevin.Brott at gmail.com> */
2006 May 09
1
xmalloc symbol in libssh
...d.o popen.o strsuftoll.o ls-unmain.o cmp.o print.o util.o -lcrypt -lutil -lm -lopie -lmd -lpam -lkrb5 -lasn1 -lcrypto -lcrypt -lroken -lcom_err -lradius -ltacplus -lcrypt -lutil -lopie -lmd -lssh -lcrypto -lcrypt -lypclnt % /usr/obj/usr/src/tmp/usr/lib/libssh.a(xmalloc.o)(.text+0xd0): In function `xstrdup': % : multiple definition of `xstrdup' % ftpd.o(.text+0x1460): first defined here % /usr/obj/usr/src/tmp/usr/bin/ld: Warning: size of symbol `xstrdup' changed from 44 in ftpd.o to 70 in /usr/obj/usr/src/tmp/usr/lib/libssh.a(xmalloc.o) %%% Regards, -- Jeremie Le Hen < jeremie at le-...
2009 May 27
0
[PATCH] src/linux/device.c: Fix segfault when running without `--net'.
...ter is passed to strdup: Program terminated with signal 11, Segmentation fault. #0 0xb7d30463 in strlen () from /lib/tls/i686/cmov/libc.so.6 (gdb) bt #0 0xb7d30463 in strlen () from /lib/tls/i686/cmov/libc.so.6 #1 0xb7d30175 in strdup () from /lib/tls/i686/cmov/libc.so.6 #2 0x0805bf47 in xstrdup (s=0x0) at xmalloc.c:118 <--- #3 0x0805be33 in setup_device () at device.c:66 #4 0x0805072e in setup_myself () at net_setup.c:432 #5 0x08050db2 in setup_network () at net_setup.c:536 #6 0x0805b27f in main (argc=Cannot access memory at address 0x0) at tincd.c:580 This patch fixes this b...
2012 May 17
2
New Subsystem criteria for Match option block in OpenSSH server
...;, &cfg, conninfo); 1463a1501,1536 > int > parse_server_match_testspec(ConnectionInfo *ci, char *spec) > { > char *p; > > while ((p = strsep(&spec, ",")) && *p != '\0') { > if (strncmp(p, "addr=", 5) == 0) > ci->address = xstrdup(p + 5); > else if (strncmp(p, "host=", 5) == 0) > ci->host = xstrdup(p + 5); > else if (strncmp(p, "user=", 5) == 0) > ci->user = xstrdup(p + 5); > else if (strncmp(p, "subsystem=", 10) == 0) > ci->subsystem = xstrdup(p + 10);...
2003 Jun 09
0
[patch] ./configure problem on Solaris
Hi, I have a problem with tftpd-hpa on Solaris-8, in that the configure script cannot find the regex engine. This is because of the following in configure.in: LIBXTRA=false AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=true AC_LIBOBJ(xmalloc)) AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true AC_LIBOBJ(xstrdup)) AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true AC_LIBOBJ(bsdsignal)) if $LIBXTRA; then LIBS="../lib/libxtra.a $LIBS" fi Solaris doesn't have xmalloc and friends available and so LIBS includes ../lib/libxtra.a. This causes all futur...
2004 Jul 20
0
broken configure in tftp-hpa 0.37
...lling with autoconf 2.59: --- tftp-hpa-0.36/configure.in 2004-01-15 22:15:46.000000000 +0200 +++ tftp-hpa-0.37/configure.in 2004-07-20 18:32:24.000000000 +0300 @@ -129,9 +129,12 @@ OBJROOT=`pwd` LIBXTRA=false -AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=true AC_LIBOBJ(xmalloc)) -AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true AC_LIBOBJ(xstrdup)) -AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true AC_LIBOBJ(bsdsignal)) +AC_SEARCH_LIBS(xmalloc, iberty, ,LIBXTRA=true +[AC_LIBOBJ(xmalloc)]) +AC_SEARCH_LIBS(xstrdup, iberty, ,LIBXTRA=true +[AC_LIBOBJ(xstrdup)]) +AC_SEARCH_LIBS(bsd_signal, bsd, ,LIBXTRA=tru...
2001 Feb 28
2
[PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
...============================================== RCS file: /cvs/openssh_cvs/auth.c,v retrieving revision 1.23 diff -u -p -r1.23 auth.c --- auth.c 2001/02/15 03:08:27 1.23 +++ auth.c 2001/02/28 15:47:23 @@ -182,6 +182,9 @@ pwcopy(struct passwd *pw) #ifdef HAVE_PW_CLASS_IN_PASSWD copy->pw_class = xstrdup(pw->pw_class); #endif +#ifdef HAVE_CYGWIN + copy->pw_gecos = xstrdup(pw->pw_gecos); +#endif copy->pw_dir = xstrdup(pw->pw_dir); copy->pw_shell = xstrdup(pw->pw_shell); return copy; Thanks in advance, Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:v...
2010 Feb 10
0
[PATCH] Use /dev/tap0 by default on BSD if mode != router
...FAULT_DEVICE_TAP "/dev/tap0" typedef enum device_type { DEVICE_TYPE_TUN, @@ -60,8 +61,12 @@ static device_type_t device_type = DEVICE_TYPE_TUN; bool setup_device(void) { char *type; - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) - device = xstrdup(DEFAULT_DEVICE); + if(!get_config_string(lookup_config(config_tree, "Device"), &device)) { + if (routing_mode != RMODE_ROUTER) + device = xstrdup(DEFAULT_DEVICE_TAP); + else + device = xstrdup(DEFAULT_DEVICE); + } if(!get_config_string(lookup_config(config_tree, "Interf...
2001 Dec 05
1
DISPLAY=localhost
...name:screen.display */ - snprintf(display, sizeof display, "%.400s:%d.%d", hostname, - display_number, screen_number); -#endif /* IPADDR_IN_DISPLAY */ - /* Allocate a channel for each socket. */ for (n = 0; n < num_socks; n++) { sock = socks[n]; @@ -2531,8 +2486,8 @@ 0, xstrdup("X11 inet listener"), 1); } - /* Return a suitable value for the DISPLAY environment variable. */ - return xstrdup(display); + /* Return the display number for the DISPLAY environment variable. */ + return display_number; } #ifndef X_UNIX_PATH Index: session.c ======================...
2023 Nov 14
1
[PATCH v3 1/2] Permit %L and %l percent escapes in ssh Include
...goto out; } if (!path_absolute(arg) && *arg != '~') { - xasprintf(&arg2, "%s/%s", + xasprintf(&arg_pre, "%s/%s", (flags & SSHCONF_USERCONF) ? "~/" _PATH_SSH_USER_DIR : SSHDIR, arg); } else - arg2 = xstrdup(arg); + arg_pre = xstrdup(arg); + arg2 = percent_expand(arg_pre, + "l", thishost, "L", shorthost, (char *) NULL); + free(arg_pre); memset(&gl, 0, sizeof(gl)); r = glob(arg2, GLOB_TILDE, NULL, &gl); if (r == GLOB_NOMATCH) { base-commit: 64e0600f23c...
2000 Sep 13
2
auth-pam.c support for pam_chauthtok()
...r(count = 0; count < num_msg; count++) { - switch (msg[count]->msg_style) { + for (count = 0; count < num_msg; count++) { + switch ((*msg)[count].msg_style) { + case PAM_PROMPT_ECHO_ON: + fputs((*msg)[count].msg, stderr); + fgets(buf, sizeof(buf), stdin); + reply[count].resp = xstrdup(buf); + reply[count].resp_retcode = PAM_SUCCESS; + break; case PAM_PROMPT_ECHO_OFF: - if (pampasswd == NULL) { - free(reply); - return PAM_CONV_ERR; - } + if (pamstate == INITIAL_LOGIN) { + if (pampasswd == NULL) { + free(reply); + return PAM_CONV_ERR; +...
2023 Dec 20
2
[PATCH RESEND 0/2] Permit %L and %l percent escapes in Include
Using these escapes, the include directive can be crafted to include differing, host-specific configuration. Ronan Pigott (2): Permit %L and %l percent escapes in ssh Include Permit %L and %l percent escapes in sshd Include readconf.c | 16 +++++++++++++--- servconf.c | 17 ++++++++++++++--- 2 files changed, 27 insertions(+), 6 deletions(-) base-commit: