<Ansuel>
sa7mfo it's not clear for what you need those host tools for
<sa7mfo>
Those are part of the build process for libcamera. Currently I have to use my own fork of openwrt-packages to build libcamera, and I would really like to use the upstream repo instead
<stintel>
oh nice, I had a go at libcamera at some point, but never got anywhere
<Ansuel>
sa7mfo please add this info in the commit message so we know why :D aside from that the changes are simple enough i can merge them right away
robimarko has quit [Remote host closed the connection]
Lynx- has joined #openwrt-devel
rua has quit [Quit: Leaving.]
<wigyori>
i was wondering if there is any target which is already on 6.6 (to work out all the missing new symbols) - looks like qualcommax is already, that's great
Lynx- is now known as Guest1538
cmonroe has quit [Ping timeout: 480 seconds]
cmonroe has joined #openwrt-devel
robimarko has joined #openwrt-devel
Guest1538 is now known as Lynx-
ynezz has joined #openwrt-devel
goliath has joined #openwrt-devel
Lynx- has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Ansuel>
jow about ucode or openwrt one rtc? If it's about ucode I manage to find a solution for it
<jow>
ok
<Ansuel>
btw i tried to use the struct module and i couldn't really make it work also i notice something strange with the map functions
<jow>
and what was it that didn't work?
<Ansuel>
about the map function map(["A","B","C"], ord); returns an array of only the "A" converted
<Ansuel>
about struct pack sometimes didn't work with some values but I can't give you a quick example now as I used alternative way with sprintf and all kind of magic with ord and chr... one thing i notice is that ucode might massively benefits with some logic to treat the data as raw bytes
<jow>
that's because the callback is invoked with three parameters for each item; the item itself, the index and the source array
<jow>
ord("A", 0, [ "A", "B", "C" ]) -> works by accident
<jow>
ord("B", 1, [ "A", "B", "C" ]) -> null
<jow>
ord("C", 2, [ "A", "B", "C" ]) -> null
<jow>
solution map(["A", "B", "C"], c => ord(c))
<Ansuel>
ohhhhh ok now it makes sense
<Ansuel>
in my script i just used this meme function function sToc(s) {
<Ansuel>
return ord(s);
<Ansuel>
}
<Ansuel>
and map([],sToc)
sauce has quit [Quit: No Ping reply in 180 seconds.]
<jow>
you can also use s = "ABC"; struct.unpack(`${length(s)}B`, s)
<Ansuel>
i'm scared and you will probably have stroke when you will notice the script I made ahahahah
<jow>
I've seen that PR, it looks mostly fine
<Ansuel>
still not sure if it's worth to use the struct module tho, seems additional space for not that much benefits
<jow>
There was a missing trailing newline in one file and the only thing I disliked was that you always invoke the otp check routine. My gut feeling is that this logic should move into rpcd itself
<jow>
into the core session logic
<Ansuel>
i assume ubus session is in c tho?
<jow>
also I assume that at this stage, the otp input field is always displayed, even if the account does not have it set up?
<Ansuel>
correct that part is still WIP
<Ansuel>
maybe i should make it as draft
<jow>
ubus session handling is in C, yes
<jow>
in the dispatcher logic you should, after the session login call concluded, check if the associated account has otp enabled, only thne invoke the otp verification
<jow>
if otp verification fails, you should destroy the just logged in session and not let it linger around
<Ansuel>
i have to check if the current ucode script can be adapted to work with the ubus session handling in C. Anything against the uci section?
<jow>
No, it looks fine.
<jow>
I wonder if one should generalize the concept, extend `config login` sections with a `list authentication_hook` uci list which specifies a series of commands/plugins to invoke in order to test the passed credentials
<jow>
e.g. a `list authentication otp` would then invoke /usr/libexec/rpcd/auth/otp or similar
<jow>
and that would receive the credentials as JSON on stdin and produce the result on stdout
<jow>
invalid output, output without success: false or exit code != 0 would reject the login, the error emitted by the plugin would get relayed back as part of the ubus call sesison login reply
<jow>
*without success: true
<jow>
Something along these lines. Then it would cover ubus-rpc over HTTP in general and not just LuCI
<jow>
this is reinventing pam, to some extent
<jow>
but pam is huge
<dwfreed>
pam core is not that complex
<dwfreed>
and you could package all the plugins separately
<Ansuel>
my idea was to propose an intermediate view after the first login... that would match your idea of having these kind of additional hook... dispacher.uc would parse the uci list and call all the hook
<Ansuel>
would even be cleaner with themese by having to implement the more specific template pages
<jow>
yeah, the state handlign would need some overhaul
<jow>
first very basic credentials, then figure out secondary auth requirements, if there's any don't yet login but redirect to one or multiple views querying additional details
<Ansuel>
if any fails destroy the session and revert to login screen
<jow>
for that to work you need to rework the logic testing for logged in sessions too
<jow>
there needs to be an additional state flag indicating whether the session is fully authenticated
tidalf has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jow>
right now it is assumed that if a sessions exists with the given secret id, it is fully authenticated
<Ansuel>
oh this is needed for the secondary auth pages right?
<jow>
yes, since multiple roundtrips are required
<jow>
or monitor changes to the username filed and query for requirements in real-time, then modify login view accordingly
<jow>
but that would allow probing for existing logins and their security requirements
<jow>
something that is discouraged
tidalf has joined #openwrt-devel
tidalf has quit []
<Ansuel>
well there is a lot to do
<Ansuel>
with this modular approach I also have to check how to rework the uci section...
tidalf has joined #openwrt-devel
skynet2 has joined #openwrt-devel
tidalf has quit []
tidalf has joined #openwrt-devel
tidalf has quit []
tidalf has joined #openwrt-devel
tidalf has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]