Page MenuHomeFreeBSD

ssh, sshd: update paths
Needs ReviewPublic

Authored by emaste on Apr 25 2021, 7:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:51 PM
Unknown Object (File)
Dec 12 2023, 4:05 AM
Unknown Object (File)
Aug 9 2023, 6:00 AM
Unknown Object (File)
Jun 24 2023, 6:57 AM
Unknown Object (File)
Jun 24 2023, 3:51 AM
Unknown Object (File)
May 22 2023, 10:20 AM
Unknown Object (File)
May 15 2023, 10:39 AM
Unknown Object (File)
May 8 2023, 5:01 AM
Subscribers

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

This review seems to lack some context ...

Most of these changes have been in FreeBSD since 2007, some only since 2020, but they have made it into 13.0 at least, and all but the change to test_sshkey.c are in 12.x, too.

Merging the change for test_sshkey.c to 12-STABLE is not possible without an MFC of the _PATH_LOCALBASE definition in include/paths.h to 12-STABLE, first.

This review seems to lack some context ...

Yes, sorry for tagging you without the context. I'm working on updating to OpenSSH 8.6p1 in the base system by cherry-picking our local changes onto upstream openssh-portable with a goal of upstreaming changes where possible, dropping changes that are no longer necessary, or at least reviewing everything again.

My WIP tree is here: https://github.com/emaste/openssh/tree/8.6p1-FreeBSD

Not a big issue for me, but the changes in this review are all attributed to des in the GIT log for this commit:

ssh, sshd: update paths
dag-erling authored and emaste committed 3 days ago

The full commit message does mention the cherry-pick from the file I modified, but not the --author of the commit.
If this is not easily fixed (i.e. GIT does only support 1 author) then just leave it as it is ...

pathnames.h
124

In our build system I have added a definition of _PATH_SSH_ASKPASS_DEFAULT and _PATH_XAUTH to the FreeBSD Makefile.
The pathes should therefore be based on ${LOCALBASE} (or use the default of "/usr/local", ${LOCALBASE} is not defined in the context of the build).
These definitions should not affect us, therefore.
(But I do not remember whether I actually tested that these Makefile definitions are effective in the build. Guess I did ...)

regress/unittests/sshkey/test_sshkey.c
18

White space of the suggested addition needs to be fixed - I do not know how to enter a tab character via the web front-end.
The default definition could also be placed in the line below

#include <paths.h>

But I did not want to break the list of included standard headers ...

84

There will be no definition of _PATH_LOCALBASE in the upstream build environment for most architectures, I'm afraid.
I have not merged the definition of _PATH_LOCALBASE back to stable/11 or stable/12, it does only exist in stable/13 and main, for example (and not in any of the other BSDs that I know of).
Therefore, a fall-back definition should be added to provide the default value of "/usr/local".