Apparently netopeer2-server expects public keys for users to be in the
canonical place (~/.ssh/authorized_keys). Infix use a custom location
in /var/run, maintained by the ietf-system plugin, which OpenSSH knows
but netopeer2-server doesn't.
It seems to be possible to add some sort of "pattern" to netopeer2 to
indicate where to look for public keys. This is added when building it
but Buildroot does not expose this as a setting. So for now, this seem
to be the least intrusive way of handling it. The owner is root, so a
malicious user cannot change the link or contents without some other
form of privilege escalation first.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
No point in leaving unused home directories lingering on the system,
also a potential security problem.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Employ the new 'adduser -d' feature where users can be created with
password login disbled instead of creating them locked by default.
This allows us to create remote users that can only access the device
using public key SSH login, which until this point was not possible.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The login applet did not know about shadow passwords, and could thus not
determine if a user accont was locked or passwordless. This caused it
to return 'login: bad salt' instead of "Login incorrect", which is the
more secure path for handling brute force attempts.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The existing 'adduser -D' command adds a locked user account, similar to
the Debian adduser --disabled-login'. This patch adds support for the
'adduser -d' command, similar to Debian 'adduser --disabled-password',
meaning login is possible but using methods other than password, e.g.,
SSH keys.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This ensures that the operstate is defined for all interface
types. Without supplying this, virtual interfaces (e.g. loopback,
dummies, tunnels) will report an "UNKNOWN" operstate. For ports backed
by physical (or virtualized) hardware, this option has no effect.
- add debug flag to trigger DEBUG() statements
- DEBUG() macro needs 'path' argument
For statd we can add support for an optional '-d' command line option to
trigger, and SIGUSR1 to toggle, debug mode. TBD for confd which still
remains to be refactored into the same standalone daemon as statd.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The idea is to 1) map debug/error macros to syslog(), which does not
need \n, and 2) when stdout logging is used, let the macro add a \n.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This change allows us to verify common RPC commands from within the
CLI, starting with the poweroff and reboot commands.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Use timezone names defined in iana-timezones.yang, replacing
the type 'string' in standard ietf-system.yang
This enables CLI (tab complete) and NETCONF clients (dropdown)
to view available timezone strings, and the yang engine to
validate the input.
Deviation in ietf-system.yang
'replace' username type from general string to a string
with length and pattern restrictions inline with the
BusyBox 'adduser' tool.
Note, chk_sr_user_update is more restrictive, which should
be handled.
Declaring deviations for optional features for clarity regaring
extent of support.
New revision and file of infix-systems created, as earlier version
was included in infix-2023.06 release.
Please see infix-systems@2023-04-11 for history.
Support and deviations has not been checked for the included
'sub-yang-module' infix-systems-software, thus there may be
more updates to come.
two fixes
- first a typo (probably copy/paste issue)
- the sleep and 'vtysh -b' was added to make
vtysh read the /etc/frr/frr.conf file upon start(*)
sleep needed to make this happen after initctl reload
(*) See https://docs.frrouting.org/en/latest/vtysh.html#integrated-configuration-mode
But there ought to be a better way.
This patch does two main things:
1) Breaks "statd" free from "confd".
2) Introduces netlink monitoring of interfaces for sysrepo data.
Prior to this patch, sysrepo operation status was handled by code
named "statd" inside "confd". (Where confd is a sysrepo-plugin and
not a real daemon, which its name implies)
In this patch, we break out the interface part of the operational
sysrepo status, previously "statd", into a new daemon, also called
"statd".
The main reason for doing this is to avoid sysrepo threading, which
allows the new "statd" to have control over sysrepo events in the
same event pool as netlink events from the kernel. This in turn allows
statd to subscribe and unsubscribe dynamically to interfaces that
comes and goes during runtime (such as vlans).
It also makes sense that "statd" is in fact a finit daemon.
Signed-off-by: Richard Alpe <richard@bit42.se>
This allows an application to set a larger socket receive buffer size.
The default size is left unchanged (212992). 1MB is arbitrary chosen.
The main reason for this is to allow netlink kernel sockets to
hold more interface data while user-space is processing it. Typically
useful during main configuration changes where lots of kernel side
changes occur in short period of time, such as VLAN creation.
Signed-off-by: Richard Alpe <richard@bit42.se>
For some reason, the `make license-info` target complained klinfix
needed a hash file, but not the other local repos. Issue #67 tracks
adding license-info to releases, which will need some looking into,
for now this fixes the most glaring packaging oversights.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This script has some seriously sharp edges. Today two devs cut their
fingers on it trying to get new functionality in place. One when, in a
attempt at, adding an innocent status daemon, and another setting up a
client repository with a custom, enabled-by-default, daemon. In both
instances this script happily cleaned out the deamons from enabled/.
A better alternative, as described in issue #74, is to be stricter on
what is enabled by default, and for things we feel provide value in the
Classic build, maintain a separate list of symlinks in its meta board
definitiion instead.
Also, clean out previous attempt at factory-config. Now that we have
the auto-factory support in place we don't need this.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
In normal use-cases querierd needs a bridge with multicast-snooping
enabled to run. No point in attempting to start querierd by default.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- allow custom options sourced from optional /etc/default/smcrouted
- don't enable smcrouted by default when enabled in Buildroot .config
because normal use-cases require an /etc/smcroute.conf
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Use same if: syntax for release/upload job as for build job. Only thing
the upload job needs to ensure is that it does not try to upload built
artifacts from forks or from non-main builds.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When calling `make foo-rebuild` one expects all the registered hooks in
the foo package to have been called by Buildroot. The Buildroot manual
has this to say about the target-finalize hook:
> These hooks are run after all packages are built, but
> before the filesystem images are generated. They are
> seldom used, and your package probably do not need them.
The correct hook to use for target packages is POST_INSTALL_TARGET_HOOK.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Verifies that RAUC bundles can be installed using NETCONF.
We choose to not add this to the "all" suite for now, as the qeneth
topologies do not run with full disk emulation.
To test locally, configure your "make run" instance to use the UEFI
loader, launch `make run`, and then run:
make INFIX_TESTS=test/case/ietf_system/upgrade.py test-run
We were now at the point where it was completely impossible to see
which files are actually built.
Bring back some order, making future diffs easier to understand.
This let's us report the installed software versions, before any
updates have been made. Since the info should _not_ be erased in a
factory reset (since the installed software versions will not change),
move the status file to aux, which is the proper place for this class
of information.
- When running with full disk emulation (via GRUB on x86, or U-Boot on
aarch64), there's no way for us to influence the commandline passed
to the kernel, so the console is fixed to ttyS0/AMA0. Therefore,
reintroduce an option to choose the console.
- Use a fixed `nr`s for virtconsoles, so that the gdbserver always
listens on `hvc1`. Ideally, we should use udevs `/dev/virtio-ports/*`
symlinks, but for some reason these point to `/dev/vportXpY` and not
to `/dev/hvcY`. TODO: Figure out what the difference is.
- While we're here, remove the duplicated RTC setup which was
introduced with the virtio-console work a while back.