[Bug 2961] New: session.c:523: error: too few arguments to function ‘session_set_fds’ when USE_PIPES is not defined

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Feb 5 21:06:20 AEDT 2019


https://bugzilla.mindrot.org/show_bug.cgi?id=2961

            Bug ID: 2961
           Summary: session.c:523: error: too few arguments to function
                    ‘session_set_fds’ when USE_PIPES is not defined
           Product: Portable OpenSSH
           Version: 7.9p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: sshd
          Assignee: unassigned-bugs at mindrot.org
          Reporter: adrian.fita at gmail.com

Hi. I'm encountering the following compilation error when I empty the
line with "#define USE_PIPES 1":

session.c: In function ‘do_exec_no_pty’:
session.c:523: warning: passing argument 1 of ‘session_set_fds’ from
incompatible pointer type
session.c:116: note: expected ‘struct ssh *’ but argument is of type
‘struct Session *’
session.c:523: warning: passing argument 2 of ‘session_set_fds’ makes
pointer from integer without a cast
session.c:116: note: expected ‘struct Session *’ but argument is of
type ‘int’
session.c:523: error: too few arguments to function ‘session_set_fds’

The following patch fixes it:

$ diff -ur openssh-7.7p1-orig openssh-7.7p1-fixed
diff -ur openssh-7.7p1-orig/session.c openssh-7.7p1-fixed/session.c
--- openssh-7.7p1-orig/session.c        2018-04-02 05:38:28.000000000
+0000
+++ openssh-7.7p1-fixed/session.c       2018-06-15 13:55:26.000000000
+0000
@@ -519,7 +519,7 @@
         * Enter the interactive session.  Note: server_loop must be
able to
         * handle the case that fdin and fdout are the same.
         */
-       session_set_fds(s, inout[1], inout[1], err[1],
+       session_set_fds(ssh, s, inout[1], inout[1], err[1],
            s->is_subsystem, 0);
 #endif
        return 0;

I don't get the compilation error when I don't remove "#define
USE_PIPES 1".

Regards,
-- 
Fita Adrian

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list