search for: mm_send_fd

Displaying 20 results from an estimated 23 matches for "mm_send_fd".

2008 Feb 20
1
alignment problem in monitor_fdpass.c
...changed from using -O2 to using -O on their ARM port, I found that sshd stopped working. (gcc version 4.2.1 20070719 [FreeBSD]) I have downloaded openssh-SNAP-20080220.tar.gz and the code still look the same. Anyway looking into it, I found that the problem is in monitor_fdpass.c in the functions mm_send_fd and mm_receive_fd. Using -O2 used to align the tmp array on a 4 byte boundary and using -O does not. On architectures that do not like unaligned accesses this will break. An extraction of mm_send_fd() look something like this: ############################## struct msghdr msg; char tmp[CMSG_SPACE(...
2002 Jun 25
1
privsep on SCO Openserver
Has anyone got privsep to work under SCO Openserver? I am testing openssh3.3p1. I have Compression turned off in sshd_config. Here is the error messages that I am getting. sshd[21469]: fatal: mm_send_fd: sendmsg(3): Bad file number sshd[21476]: fatal: mm_receive_fd: recvmsg: expected received 1 got 0 --Sam
2003 Sep 18
1
Problem building OpenSSH on Cobalt Raq2i running standard Linux
...quot; -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/local/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c monitor_fdpass.c monitor_fdpass.c: In function `mm_send_fd': monitor_fdpass.c:57: `SCM_RIGHTS' undeclared (first use this function) monitor_fdpass.c:57: (Each undeclared identifier is reported only once monitor_fdpass.c:57: for each function it appears in.) make: *** [monitor_fdpass.o] Error 1 I'm trying to build v3.7.1p1 at the moment, and I...
2008 Jul 29
1
Question regarding alignment patch
Contrast http://cvsweb.mindrot.org/index.cgi/openssh/monitor_fdpass.c?r1=1.23;r2=1.24 with http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/monitor_fdpass.c.diff?r1=1.14&r2=1.15 The original replaces cmsgbuf.tmp with cmsgbuf.buf, while the -portable version *adds* cmsgbuf.buf but retains cmsgbuf.tmp. I assume this was an oversight, and cmsgbuf.tmp should be removed? DES -- Dag-Erling
2010 Mar 09
1
sshd version OpenSSH_5.4p1 fails on OpenBSD 4.2 GENERIC macppc
...put_global_request: rtype no-more-sessions at openssh.com want_reply 0 debug1: server_input_channel_req: channel 0 request pty-req reply 1 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req pty-req debug1: Allocating pty. debug1: session_new: session 0 mm_send_fd: sendmsg(7): Invalid argument mm_answer_pty: send fds failed debug1: do_cleanup debug1: session_pty_cleanup: session 0 release /dev/ttyp2 I acknowledge that OpenSSH_5.4p1 is for every thing but OpenBSD and that I'd better upgrade to last OpenBSD version. Ph.L.
2002 Jun 27
3
OpenSSH 3.4p1 - compilation problem on Linux
...all'. make[1]: Leaving directory `/tools/openssh-3.4p1/openbsd-compat' gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib -lssh -lopenbsd-compat -lbsd -lz -lcrypto ./libssh.a(monitor_fdpass.o): In function `mm_send_fd': /tools/openssh-3.4p1/monitor_fdpass.c:54: undefined reference to `CMSG_FIRSTHDR' /tools/openssh-3.4p1/monitor_fdpass.c:58: undefined reference to `CMSG_DATA' ./libssh.a(monitor_fdpass.o): In function `mm_receive_fd': /tools/openssh-3.4p1/monitor_fdpass.c:114: undefined reference t...
2008 Jul 06
11
OpenSSH 5.1: call for testing
Hi, OpenSSH 5.1 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This release is one of the biggest in recent years, with two hackathons' worth of improvements and fixes for some of our most recalcitrant bugs. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is
2002 May 29
2
OpenSSH 3.2.3p1 won't compile under IRIX 6.5.14
...ass\" -D_PATH_SFTP_SERVER=\"/usr/libexec/sftp-server\" -D_PATH_SSH_PIDDIR=\"/etc/openssh\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c monitor_fdpass.c monitor_fdpass.c: In function `mm_send_fd': monitor_fdpass.c:58: `SCM_RIGHTS' undeclared (first use in this function) monitor_fdpass.c:58: (Each undeclared identifier is reported only once monitor_fdpass.c:58: for each function it appears in.) monitor_fdpass.c: In function `mm_receive_fd': monitor_fdpass.c:117: `SCM_RIGHTS'...
2006 Nov 01
0
No subject
HAVE_SENDMSG = 1 HAVE_ACCRIGHTS_IN_MSGHDR - not defined HAVE_CONTROL_IN_MSGHDR = 1 > void > mm_send_fd(int socket, int fd) > { > #if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) > struct msghdr msg; > struct iovec vec; > char ch = '\0'; > int n; > #ifndef HAVE_ACCRIGHTS_IN_MSGHDR >...
2006 Aug 15
1
OpenSSH_4.3p2 fails to create a pty session
...sshd_config installed by the port. I can authenticate, copy files, and start processes, but sshd fails to create a tty session. This happens from remote machines and creating a session from the host machine. I find the following under messages. Aug 8 19:32:16 mongoloid sshd[44626]: fatal: mm_send_fd: sendmsg(4): Bad file descriptor Aug 8 19:32:16 mongoloid sshd[44626]: error: close(s->ptymaster/0): Bad file descriptor Aug 8 19:32:16 mongoloid sshd[44629]: fatal: mm_receive_fd: recvmsg: expected received 1 got 0 And here is a debug script from sshd. Script started on Tue Aug 8 19:33:...
2002 Jun 14
0
[Bug 276] New: openssh-3.2.3p1 does not compile on IRIX - SCM_RIGHTS undefined
..._PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" -D_PATH_SSH_PIDDIR=\"/usr/local/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/local/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c monitor_fdpass.c monitor_fdpass.c: In function `mm_send_fd': monitor_fdpass.c:58: `SCM_RIGHTS' undeclared (first use in this function) monitor_fdpass.c:58: (Each undeclared identifier is reported only once monitor_fdpass.c:58: for each function it appears in.) monitor_fdpass.c: In function `mm_receive_fd': monitor_fdpass.c:117: `SCM_RIGHTS'...
2002 Jun 25
0
make fails during linking
...make fails during linking with the following error message: gcc -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o -L. -Lopenbsd-compat/ -L/usr/local/ssl/lib -L/usr/local/lib -lssh -lopenbsd-compat -lbsd -lz -lcrypto ./libssh.a(monitor_fdpass.o): In function `mm_send_fd': /home/oliver/test/openssh-3.3p1/monitor_fdpass.c:54: undefined reference to `CMSG_FIRSTHDR' /home/oliver/test/openssh-3.3p1/monitor_fdpass.c:58: undefined reference to `CMSG_DATA' ./libssh.a(monitor_fdpass.o): In function `mm_receive_fd': /home/oliver/test/openssh-3.3p1/monitor_fd...
2002 Jun 27
0
[Bug 311] New: Compile fails on MIPS Linux (Cobalt Raq2) - SCM_RIGHTS undeclared
...; - D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" - D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" - DSSH_RAND_HELPER=\"/usr/local/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c monitor_fdpass.c monitor_fdpass.c: In function `mm_send_fd': monitor_fdpass.c:57: `SCM_RIGHTS' undeclared (first use this function) monitor_fdpass.c:57: (Each undeclared identifier is reported only once monitor_fdpass.c:57: for each function it appears in.) monitor_fdpass.c: In function `mm_receive_fd': monitor_fdpass.c:115: `SCM_RIGHTS' un...
2002 Jul 04
0
[Bug 336] New: ssh does not compile on Linux with libc5 and 2.0 kernel
...ot.org ReportedBy: johanw at xs4all.nl When compiling ssh on an older Linux system with a 2.0 kernel and libc5, compile errors arise because configure erroneously defines HAVE_CONTROL_IN_MSGHDR in config.h. This results in undefined references: ./libssh.a(monitor_fdpass.o): In function `mm_send_fd': /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:54: undefined reference to `CMSG_FIRSTHDR' /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:58: undefined reference to `CMSG_DATA' ./libssh.a(monitor_fdpass.o): In function `mm_receive_fd': /Packages/ssh/openssh-3.4p1/monitor_fdpass.c:114:...
2004 Jul 18
0
HPUX and privsep
Subject: HPUX and privsep Anyone solved or see the same connection I do with these two issues on HPUX if Privilege Separation is turned off ? Logname not found (3.7.1p2, 3.8.1p1) Login prematurely quits during session setup (mm_send_fd: sendmsg(3): Bad file number | mm_receive_fd: recvmsg: expected received 1 got 0) (3.8.1p1) Seems the mm_xxxx_() functions arent called when PrivSep is off. The utmpx line field isnt filled in correctly (loginrec.c:line_abbrevname() - easy to fix) but doenst seem to affect these problems. This...
2014 Jul 28
4
[Bug 2260] New: monitor_fdpass.c fails to compile on QNX 6.3.2
...ATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c monitor_fdpass.c monitor_fdpass.c: In function `mm_send_fd': monitor_fdpass.c:61: storage size of `pfd' isn't known monitor_fdpass.c:70: warning: comparison between signed and unsigned monitor_fdpass.c:83: `POLLOUT' undeclared (first use in this function) monitor_fdpass.c:83: (Each undeclared identifier is reported only once monitor_fdpass....
2010 Jan 14
1
ssh(1) multiplexing rewrite
...+ error("%s: termination request failed: %s", __func__, e); + return -1; + default: + fatal("%s: unexpected response from master 0x%08x", + __func__, type); } + buffer_free(&m); + + return 0; +} + +static int +mux_client_request_forwards(int fd) +{ + int i; - if (mm_send_fd(sock, STDIN_FILENO) == -1 || - mm_send_fd(sock, STDOUT_FILENO) == -1 || - mm_send_fd(sock, STDERR_FILENO) == -1) { - error("%s: send fds failed", __func__); - goto muxerr; + debug3("%s: requesting forwardings: %d local, %d remote", __func__, + options.num_local_for...
2002 Dec 21
6
[PATCH] PAM chauthtok + Privsep
...fore the session has acquired its controlling + * tty or the chauthtok child will not be able to acquire it and + * will fail. + */ + +void +mm_do_pam_chauthtok(void) +{ + int result; + Buffer m; + + buffer_init(&m); + mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_CHAUTHTOK, &m); + mm_send_fd(pmonitor->m_recvfd, STDIN_FILENO); + mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_CHAUTHTOK, &m); + + buffer_free(&m); +} #endif /* USE_PAM */ /* Request process termination */ Index: monitor_wrap.h =================================================================...
2002 Dec 10
5
[PATCH] Password expiry with Privsep and PAM
...ee(&m); } + +void +mm_do_pam_chauthtok(void) +{ + Buffer m; + int ttyfd; + + buffer_init(&m); + + if ((ttyfd = open(_PATH_TTY, O_RDWR)) < 0) + fatal("%s: can't open %s", __func__, _PATH_TTY); + + mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_CHAUTHTOK, &m); + mm_send_fd(pmonitor->m_recvfd, 0); + mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_CHAUTHTOK, &m); + close(ttyfd); + + buffer_free(&m); +} #endif /* USE_PAM */ /* Request process termination */ Index: monitor_wrap.h ============================================================...
2003 Oct 28
2
Privilege separation
...nssh-3.7.1p2.privsep/monitor_fdpass.h openssh-3.7.1p2/monitor_fdpass.h --- openssh-3.7.1p2.privsep/monitor_fdpass.h Wed Jun 26 03:04:11 2002 +++ openssh-3.7.1p2/monitor_fdpass.h Sat Oct 4 22:44:24 2003 @@ -28,7 +28,9 @@ #ifndef _MM_FDPASS_H_ #define _MM_FDPASS_H_ +#ifndef DISABLE_PRIVSEP void mm_send_fd(int, int); int mm_receive_fd(int); +#endif /* DISABLE_PRIVSEP */ #endif /* _MM_FDPASS_H_ */ diff -adurN openssh-3.7.1p2.privsep/monitor_mm.h openssh-3.7.1p2/monitor_mm.h --- openssh-3.7.1p2.privsep/monitor_mm.h Thu Sep 12 04:43:31 2002 +++ openssh-3.7.1p2/monitor_mm.h Sat Oct 4 22:45:11 2003 @...