[Bug 3474] ssh_config can escape double quotes with a backslash

2022-10-10 Thread bugzilla-daemon
https://bugzilla.mindrot.org/show_bug.cgi?id=3474

--- Comment #3 from Damien Miller  ---
No unfortunately - it's a bit more of a substantial rewrite than that.
strdelim() is an incremental tokeniser whereas argv_split() turns a
string into a vector of arguments in one go.

https://github.com/openssh/openssh-portable/commit/ea9e45c89a is the
commit where we started using it for config parsing if you want to have
a go at this yourself.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
___
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs


[Bug 3482] Compilation fails with clang

2022-10-10 Thread bugzilla-daemon
https://bugzilla.mindrot.org/show_bug.cgi?id=3482

Damien Miller  changed:

   What|Removed |Added

 CC||d...@mindrot.org

--- Comment #1 from Damien Miller  ---
This code should only be compiled when libc fails to provide
asprintf(), which most modern ones do (inc. glibc). So the problem is
more likely configure failing to detect its presence.

Can you search though config.log to see what went wrong?

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
___
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs


[Bug 3474] ssh_config can escape double quotes with a backslash

2022-10-10 Thread bugzilla-daemon
https://bugzilla.mindrot.org/show_bug.cgi?id=3474

--- Comment #2 from unknowndev...@pm.me ---
(In reply to Damien Miller from comment #1)
> readconf.c:match_cfg_line() probably needs to be converted from
> strdelim() to argv_split() for this to happen.

s/strdelim()/argv_split()/
Like this?

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
___
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs


[Bug 3482] New: Compilation fails with clang

2022-10-10 Thread bugzilla-daemon
https://bugzilla.mindrot.org/show_bug.cgi?id=3482

Bug ID: 3482
   Summary: Compilation fails with clang
   Product: Portable OpenSSH
   Version: 9.1p1
  Hardware: amd64
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P5
 Component: Miscellaneous
  Assignee: unassigned-b...@mindrot.org
  Reporter: jul...@julien-bigot.fr

This issue is similar to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98733 or
https://bugs.llvm.org/show_bug.cgi?id=23562 

Clang fails to compile `bsd-asprintf.c` that's part of openssh. It
seems to turn the `asprintf` symbol into a macro when using `-O2`
`-D_FORTIFY_SOURCE=2` + `#include includes.h`.

More detail here: https://github.com/spack/spack/issues/33131

```
/opt/spack/lib/spack/env/clang/clang -g -O2 -pipe
-Wunknown-warning-option -Qunused-arguments -Wall -Wpointer-arith
-Wuninitialized -Wsign-compare -Wformat-security
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result
-Wmisleading-indentation -Wbitwise-instead-of-logical
-fno-strict-aliasing -mretpoline -D_FORTIFY_SOURCE=2 -ftrapv
-fzero-call-used-regs=all -fno-builtin-memset -fstack-protector-strong 
 -fPIC -I. -I.. -I. -I./..  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-D_DEFAULT_SOURCE
-I/opt/install/linux-ubuntu18.04-x86_64/clang-15.0.0/krb5-1.19.3-riaeukuk7bbucxf5gmp6jeoh2ubhkrul/include
-I/opt/install/linux-ubuntu18.04-x86_64/clang-15.0.0/krb5-1.19.3-riaeukuk7bbucxf5gmp6jeoh2ubhkrul/include
-DHAVE_CONFIG_H -c bsd-asprintf.c


bsd-asprintf.c:86:5: error: expected parameter declarator
int asprintf(char **str, const char *fmt, ...)
^
/usr/include/x86_64-linux-gnu/bits/stdio2.h:199:24: note: expanded from
macro 'asprintf'
  __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, VA_ARGS)
   ^
/usr/include/features.h:382:31: note: expanded from macro
'__USE_FORTIFY_LEVEL'
#  define __USE_FORTIFY_LEVEL 2
  ^
bsd-asprintf.c:86:5: error: expected ')'
/usr/include/x86_64-linux-gnu/bits/stdio2.h:199:24: note: expanded from
macro 'asprintf'
  __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, VA_ARGS)
   ^
/usr/include/features.h:382:31: note: expanded from macro
'__USE_FORTIFY_LEVEL'
#  define __USE_FORTIFY_LEVEL 2
  ^
bsd-asprintf.c:86:5: note: to match this '('
/usr/include/x86_64-linux-gnu/bits/stdio2.h:199:18: note: expanded from
macro 'asprintf'
  __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, VA_ARGS)
 ^
bsd-asprintf.c:86:5: error: conflicting types for '__asprintf_chk'
int asprintf(char **str, const char *fmt, ...)
^
/usr/include/x86_64-linux-gnu/bits/stdio2.h:199:3: note: expanded from
macro 'asprintf'
  __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, VA_ARGS)
  ^
/usr/include/x86_64-linux-gnu/bits/stdio2.h:158:12: note: previous
declaration is here
extern int __asprintf_chk (char **__restrict __ptr, int __flag,
   ^
bsd-asprintf.c:92:15: error: use of undeclared identifier 'fmt'
va_start(ap, fmt);
 ^
bsd-asprintf.c:93:23: error: use of undeclared identifier 'fmt'
ret = vasprintf(str, fmt, ap);
 ^
5 errors generated.
```

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs


[Bug 3481] New: PAM_TEXT_INFO messages are shown twice if they are the last conversation

2022-10-10 Thread bugzilla-daemon
https://bugzilla.mindrot.org/show_bug.cgi?id=3481

Bug ID: 3481
   Summary: PAM_TEXT_INFO messages are shown twice if they are the
last conversation
   Product: Portable OpenSSH
   Version: 8.4p1
  Hardware: Other
OS: Linux
Status: NEW
  Severity: normal
  Priority: P5
 Component: PAM support
  Assignee: unassigned-b...@mindrot.org
  Reporter: b...@mrvanes.com

When the last conversation from PAM module is of type PAM_TEXT_INFO,
the last message "User admin has authenticated successfully" is
displayed twice as can be seen in the output from our module:

$ ssh a...@client.vm.scz-vm.net
(a...@client.vm.scz-vm.net) Please sign in to:
https://sbs.scz-vm.net/weblogin/weblogin/d8b054d3-8082-4278-8947-82973b77
Verification code: 
User admin has authenticated successfully
User admin has authenticated successfully
Last login: Mon Oct 10 13:27:31 2022 from 172.20.1.1

The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

However, when I add a conversation "Press Enter to continue" of type
PAM_PROMPT_ECHO_OFF just before the PAM module returns, I get this:

$ ssh a...@client.vm.scz-vm.net
(a...@client.vm.scz-vm.net) Please sign in to:
https://sbs.scz-vm.net/weblogin/weblogin/fd0cc5e5-a0f4-4eb6-a14b-68196ed7110f
Verification code: 
(a...@client.vm.scz-vm.net) User admin has authenticated successfully
Press Enter to continue
Last login: Mon Oct 10 13:33:12 2022 from 172.20.1.1

The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.


Pamtester does not exhibit this behaviour.

The PAM module code, for reference:
https://github.com/SURFscz/pam-weblogin

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
___
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs