💾 Archived View for gemini.ctrl-c.club › ~phoebos › logs › freenode-kisslinux-2019-11-30.txt captured on 2024-05-26 at 16:28:55.
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
2019-11-30T00:08:21 #kisslinux <E5ten> bye bye lxqt-panel, it's been a good ride but the lib you dep decided to be an ass 2019-11-30T03:17:24 #kisslinux <Crestwave> I was able to replace all instances of test in bf.sh without abusing case with my let implementation: https://github.com/Crestwave/snippets/commit/38909a28bac305e326a5a810aa6fb96ba2cd69ed 2019-11-30T03:17:35 #kisslinux <Crestwave> Pretty nifty, although I won't be using it in the main program 2019-11-30T03:19:03 #kisslinux <Crestwave> By the way, isn't `echo "$var"` unportable in POSIX (used in bud)? 2019-11-30T03:26:10 #kisslinux <Crestwave> I haven't looked much into the program to see if it was intended, but you could be making the same mistake as before with trapping INT in pash (preventing the program from exiting on it)? 2019-11-30T03:29:24 #kisslinux <Crestwave> Also, just as an FYI, I had a discussion before about the use of hash and type instead of command -v in POSIX 2019-11-30T03:30:23 #kisslinux <Crestwave> Their exit codes apparently aren't as explicitly defined; command says it exits >0 if "The command_name could not be found or an error occurred.", but hash/type just say if an error occurred 2019-11-30T03:31:29 #kisslinux <Crestwave> However, I would think it should be considered an error if hash doesn't find the command, since its use is to add it to the hash table 2019-11-30T03:31:56 #kisslinux <Crestwave> Just an FYI 2019-11-30T03:35:02 #kisslinux <Crestwave> Oh, and someone mentioned that hash (not type) exited with 0 in one implementation/circumstance where the command wasn't found, but no examples were given, so I'm guessing that it had a slash, which is undefined in POSIX. 2019-11-30T07:30:37 #kisslinux <dylanaraps> Crestwave: Fixed both. Thanks 2019-11-30T07:31:12 #kisslinux <dylanaraps> Someone also told me not to do: 'printf %s "$var" | gpg' as a non-builtin printf will leak the password. 2019-11-30T07:31:22 #kisslinux <dylanaraps> He recommended I use heredocs instead. 2019-11-30T07:31:26 #kisslinux <dylanaraps> But... 2019-11-30T07:31:30 #kisslinux <dylanaraps> They use temporary files. 2019-11-30T07:48:32 #kisslinux <Crestwave> Are they plainly readable by another process, though? Is how they work even specified by POSIX? 2019-11-30T07:50:03 #kisslinux <Crestwave> tldp says "Here documents create temporary files, but these files are deleted after opening and are not accessible to any other process", but that's Bash 2019-11-30T07:51:52 #kisslinux <dylanaraps> I don't see the problem with a system `printf` though. 2019-11-30T07:52:38 #kisslinux <dylanaraps> Also see this comment and my reply: https://old.reddit.com/r/commandline/comments/e3esvn/pash_a_simple_password_manager_written_in_posix_sh/f93wsad/ 2019-11-30T08:11:24 #kisslinux <dylanaraps> Crestwave: https://termbin.com/tfo2 2019-11-30T08:11:26 #kisslinux <dylanaraps> Thoughts? 2019-11-30T08:11:43 #kisslinux <dylanaraps> (Timeout will be configurable of course) 2019-11-30T08:12:06 #kisslinux <dylanaraps> This uses the same selection command but feeds it nothing as a means of clearing the clipboard when the timer finishes. 2019-11-30T08:38:41 #kisslinux <Crestwave> Any reason for not using </dev/null instead of printf and braces instead of a subshell? 2019-11-30T08:39:46 #kisslinux <dylanaraps> Would 'printf '' |' not be more portable? The password command is configurable and I'm unsure if they all handle /dev/null correctly. 2019-11-30T08:39:57 #kisslinux <dylanaraps> Braces could work too. 2019-11-30T08:42:06 #kisslinux <Crestwave> Is there something that it needs to handle with /dev/null? Don't both of those just give it EOF? 2019-11-30T08:42:17 #kisslinux <dylanaraps> You're right. 2019-11-30T08:42:48 #kisslinux <dylanaraps> Fixed. 2019-11-30T08:43:09 #kisslinux <dylanaraps> See: https://github.com/dylanaraps/pash/pull/10/files#diff-426a6214d30516f30c74e9a881cec101 2019-11-30T08:47:45 #kisslinux <mforney> i think the problem with a system `printf` is the arguments will show up in /proc/$PID/cmdline (and ps -ef output) 2019-11-30T08:48:38 #kisslinux <dylanaraps> Ah 2019-11-30T08:48:40 #kisslinux <dylanaraps> Noted. 2019-11-30T08:48:59 #kisslinux <Crestwave> Nice `kill 0` trick 2019-11-30T08:49:45 #kisslinux <dylanaraps> Yeah 2019-11-30T08:49:59 #kisslinux <dylanaraps> So the question is, heredocs or the risk of system printf? 2019-11-30T08:50:59 #kisslinux <dylanaraps> See: https://trac.torproject.org/projects/tor/ticket/24755 2019-11-30T09:00:14 #kisslinux <dylanaraps> Another solution is to figure out what printing commands exist in the current shell. 2019-11-30T09:00:33 #kisslinux <dylanaraps> By parsing `type` most likely. 2019-11-30T09:03:43 #kisslinux <dylanaraps> Hang on. 2019-11-30T09:03:46 #kisslinux <dylanaraps> It doesn't leak. 2019-11-30T09:04:45 #kisslinux <dylanaraps> I changed the printf of the password to /bin/printf and inspected /proc. 2019-11-30T09:05:20 #kisslinux <dylanaraps> Even if gpg hangs waiting for input (for example), the printf won't leak the password as it executes in 0ms. 2019-11-30T09:06:30 #kisslinux <dylanaraps> There's a tiny chance that you *could* grab the password of course but I don't think it can realistically happen. 2019-11-30T09:15:01 #kisslinux <mforney> i think heredoc is still slightly better, since it seems they are commonly implemented with a pipe and fork, or a temporary file created with mkstemp, so there is no window where the password is visible to other users 2019-11-30T09:16:25 #kisslinux <dylanaraps> Will do. 2019-11-30T09:28:38 #kisslinux <dylanaraps> mforney: https://github.com/dylanaraps/pash/commit/638a011f2a58a64b10ae932e57e0ae62ce765524 2019-11-30T09:28:40 #kisslinux <dylanaraps> :) 2019-11-30T09:31:44 #kisslinux <mforney> nice 2019-11-30T09:47:46 #kisslinux <dylanaraps> https://github.com/dylanaraps/pash/releases/tag/2.2.0 2019-11-30T09:47:55 #kisslinux <dylanaraps> Clipboard timeout has been implemented too. :) 2019-11-30T09:49:16 #kisslinux <qtpie> nice 2019-11-30T09:49:36 #kisslinux <qtpie> can we add our own custom passwords? 2019-11-30T09:50:01 #kisslinux <qtpie> and what about multiline entries? 2019-11-30T09:50:35 #kisslinux <dylanaraps> qtpie: You can add your own password by running `pash add test` and selecting `n` at the prompt. 2019-11-30T09:51:27 #kisslinux <qtpie> i see 2019-11-30T09:51:55 #kisslinux <dylanaraps> qtpie: There's no multiline support, however pash should be 100% compatible with `pass`'s database so you can use existing entries. 2019-11-30T09:52:15 #kisslinux <dylanaraps> Support just needs to be implemented for *adding* multiline entries basically. 2019-11-30T09:52:46 #kisslinux <dylanaraps> pash is a password manager though. It's only intended to store and manage single line passwords. 2019-11-30T09:54:14 #kisslinux <qtpie> I use multiline entries for storing bank related data as well but I get your point 2019-11-30T09:54:33 #kisslinux <qtpie> shouldn't be an issue though becuase as you said it's compatible with pass 2019-11-30T09:56:13 #kisslinux <dylanaraps> Yeah, your existing entries should work just fine with pash. 2019-11-30T09:57:13 #kisslinux <dylanaraps> If it's simple to add multi-line input, I may implement it. 2019-11-30T09:57:31 #kisslinux <dylanaraps> You could also write your own code for this, see: https://github.com/dylanaraps/pash#how-can-i-extend-pash 2019-11-30T09:59:05 #kisslinux <qtpie> very nice 2019-11-30T09:59:47 #kisslinux <qtpie> dylanaraps, regarding the firefox issue, I installed FF69.0.3 on arch install and the that is stuttering as well 2019-11-30T10:00:15 #kisslinux <qtpie> I am starting to think it's related to video drivers 2019-11-30T10:00:57 #kisslinux <dylanaraps> Huh 2019-11-30T10:01:00 #kisslinux <dylanaraps> Interesting. 2019-11-30T10:01:07 #kisslinux <dylanaraps> I'm not using xf86-video-intel though. 2019-11-30T10:01:25 #kisslinux <qtpie> here https://pst.moe/paste/balqve 2019-11-30T10:01:32 #kisslinux <qtpie> i found some threads on r/archlinux 2019-11-30T10:03:47 #kisslinux <dylanaraps> Fixed an oops: https://github.com/dylanaraps/pash/releases/tag/2.2.1 2019-11-30T10:04:26 #kisslinux <dylanaraps> Tried the LTS kernel? 2019-11-30T10:05:58 #kisslinux <qtpie> nope. I don't have the time right now really 2019-11-30T10:06:19 #kisslinux <qtpie> btw i just installed compton/picom and the stuttering seems to be have been fixed for now atleast 2019-11-30T12:11:18 #kisslinux <belfry> hey 2019-11-30T12:29:51 #kisslinux <dylanara1> Hello 2019-11-30T12:33:26 #kisslinux <qtpie> dylanara1, I've been running FFv71 on KISS along with picom/compton for a couple of hours now. Didn't have any freezes so far 2019-11-30T12:33:55 #kisslinux <qtpie> will report If I get any freezes 2019-11-30T12:33:56 #kisslinux <dylanara1> qtpie: Nice will try a compositor. 2019-11-30T13:38:02 #kisslinux <dylanara1> Crestwave: https://github.com/dylanaraps/pash/pull/11/files 2019-11-30T13:38:16 #kisslinux <dylanara1> Pure POSIX sh tree implementation (minus find of course). :D 2019-11-30T13:47:36 #kisslinux <dylanara1> pash made it onto lobsters huh? 2019-11-30T13:50:07 #kisslinux <dylanara1> Oops, need to fix an issue with my tree version. 2019-11-30T14:01:06 #kisslinux <belfry> huh, pash looks nice, piqued my interest 2019-11-30T14:01:17 #kisslinux <dylanara1> Thanks 2019-11-30T14:01:22 #kisslinux <belfry> btw, have you heard about iwd? 2019-11-30T14:01:39 #kisslinux <dylanara1> I have, yeah. 2019-11-30T14:01:48 #kisslinux <dylanara1> Sadly, it has a mandatory dependency on dbus. 2019-11-30T14:02:35 #kisslinux <qtpie> can it run with nobus? 2019-11-30T14:03:00 #kisslinux <dylanara1> I doubt it as iwd is built around dbus. 2019-11-30T14:03:45 #kisslinux <dylanara1> iwd compiles fine without dbus installed fyi but it won't work at runtime as it tries to connect to the dbus daemon. 2019-11-30T14:04:02 #kisslinux <qtpie> i see 2019-11-30T14:04:05 #kisslinux <belfry> yea, shame 2019-11-30T14:04:38 #kisslinux <belfry> otherwise it looked like a pretty interesting alternative to the whatever+wpa_supplicant+dhcpcd stack when talking WiFi 2019-11-30T14:04:50 #kisslinux <dylanara1> I just use wpa_supplicant and dhcpcd. 2019-11-30T14:05:53 #kisslinux <qtpie> wpa_supplicant just works 2019-11-30T14:06:01 #kisslinux <belfry> so do I on KISS, yea 2019-11-30T14:06:33 #kisslinux <qtpie> the only thing I don't like about it is that it doesn't automatically switches to a higer priority network automatically 2019-11-30T14:06:48 #kisslinux <dylanara1> You could package dbus and iwd and share your repository if you like. 2019-11-30T14:06:52 #kisslinux <qtpie> it isn't a big deal though because wpa_cli makes it easier 2019-11-30T14:07:09 #kisslinux <dylanara1> qtpie: There might be a config option for that? 2019-11-30T14:07:55 #kisslinux <qtpie> I looked for it online but couldn't find one. Some guys suggested adding a 'wpa_roam' option in /etc/interfaces but this method is deprecated afaik 2019-11-30T14:08:36 #kisslinux <qtpie> wpa_cli isn't that bad tbh. takes me like a few seconds to change networks 2019-11-30T14:09:03 #kisslinux <dylanara1> Tried adding 'priority=N' to each network? 2019-11-30T14:09:51 #kisslinux <qtpie> yes 2019-11-30T14:10:04 #kisslinux <dylanara1> Ah 2019-11-30T14:10:21 #kisslinux <qtpie> I have 3 networks configured and all of them have different priorities 2019-11-30T14:16:17 #kisslinux <belfry> hmm, I am poking around in the iwd source-code 2019-11-30T14:17:00 #kisslinux <belfry> and the dbus functionality looks pretty isolated and pretty eloquent code 2019-11-30T14:17:30 #kisslinux <dylanara1> Are you sure? I've tried patching the source (was a while ago) 2019-11-30T14:18:00 #kisslinux <belfry> their dbus api is src/dbus.c and src/dbus.h, looks like the entire project just uses what's defined there 2019-11-30T14:18:41 #kisslinux <belfry> although it is required to yeet the tests and unit tests 2019-11-30T14:18:44 #kisslinux <belfry> and some tools as well 2019-11-30T14:20:24 #kisslinux <belfry> huh, there's apparently some code for wired connections as well 2019-11-30T14:20:26 #kisslinux <belfry> interesting 2019-11-30T14:20:52 #kisslinux <dylanara1> Yup 2019-11-30T14:20:56 #kisslinux <dylanara1> Supports wired too. 2019-11-30T14:21:26 #kisslinux <belfry> given that it has built-in thin dhcpcd, it could be pretty interesting 2019-11-30T14:22:41 #kisslinux <belfry> I will see if I can rewrite the "dbus" api to use something like unix sockets or if I can introduce a little bit of corrosion and use `ipc-channel` 2019-11-30T14:23:13 #kisslinux <dylanara1> What's funny is that dbus uses sockets underneath. 2019-11-30T14:23:38 #kisslinux <dylanara1> I have a feeling that we'll eventually have BUS1 in the kernel. 2019-11-30T14:24:21 #kisslinux <dylanara1> Which *is* far better designed than dbus thanks to the anal nature of kernel critique. 2019-11-30T14:24:42 #kisslinux <dylanara1> Also doesn't need a userspace daemon thank god. 2019-11-30T14:25:07 #kisslinux <belfry> yea, anything to get rid of that pos demon 2019-11-30T14:30:20 #kisslinux <belfry> damn, I really hate when packages don't list autotools as their dependency 2019-11-30T14:30:32 #kisslinux <belfry> gets me everytime I try to build any AUR package 2019-11-30T14:30:43 #kisslinux <Crestwave> Re. tree: Cool. I thought that you would need a command separator between that IFS=/ and set, though? But I haven't tried it and I'm going to go to bed so if it works, it works, I guess? 2019-11-30T14:36:02 #kisslinux <dylanara1> Crestwave: It works. 2019-11-30T14:44:34 #kisslinux <Aarg[m]> dylanaraps, an alternative to the heredoc in pash would be using awk to print an environment variable 2019-11-30T14:45:08 #kisslinux <Aarg[m]> but Im not sure if /proc/<pid>/environ is always only readable by owner 2019-11-30T14:45:40 #kisslinux <dylanara1> It's not an environment variable though. We're passing a shell variable (containing the generated or inputted password) to 'gpg' to encrypt and store. 2019-11-30T14:45:41 #kisslinux <Aarg[m]> dylanara1: ^ 2019-11-30T14:46:16 #kisslinux <dylanara1> Sorry, I keep disconnecting and sometimes reconnect as this nick. 2019-11-30T14:46:17 #kisslinux <Aarg[m]> pass=$pass awk 'BEGIN { print ENVIRON["pass"] }' | $gpg ... 2019-11-30T14:46:35 #kisslinux <dylanara1> That would expand into /proc no? 2019-11-30T14:46:56 #kisslinux <dylanara1> It's then no different to 'printf %s "$pass" | gpg'. 2019-11-30T14:47:12 #kisslinux <Aarg[m]> not in cmdline, no 2019-11-30T14:48:09 #kisslinux <Aarg[m]> but not sure if that is default behaviour, portable etc. 2019-11-30T14:48:57 #kisslinux <dylanara1> Oh, I see. 2019-11-30T14:49:11 #kisslinux <dylanara1> I read it as 'awk -v pass=pass 2019-11-30T14:49:19 #kisslinux <dylanara1> '* 2019-11-30T14:50:09 #kisslinux <Aarg[m]> heh, Im smarter than that :> 2019-11-30T14:54:47 #kisslinux <Crestwave> Oh, I misunderstood the use of the set. I thought for some reason it would immediately get `a/b` but you use `find` so of course it's `a` then `a/b`; I should really be sleeping now. So what's happening is that it sets IFS=/ when it's on `a`, which is then utilized in the later loops. Works, but it's misleading. 2019-11-30T14:55:35 #kisslinux <dylanara1> Huh 2019-11-30T14:55:47 #kisslinux <dylanara1> It is a/b. 2019-11-30T14:56:07 #kisslinux <Aarg[m]> the awk ENVIRON array is not POSIX apparently 2019-11-30T14:57:29 #kisslinux <Crestwave> dylanara1: What do you mean? It does use `a/b` later, but it always iterates over `a` first, right? 2019-11-30T15:00:10 #kisslinux <dylanara1> The entire path is split on '/' and 'shift' is then used to drop the 'a' as we need the separator count and not the path item count. 2019-11-30T15:00:48 #kisslinux <Crestwave> Yes, but it iterates over the root first before the full path 2019-11-30T15:01:17 #kisslinux <Crestwave> So when it's iterating over the root, it sets IFS=/ for the future iterations, which is why you don't notice anything 2019-11-30T15:01:55 #kisslinux <dylanara1> Gotcha 2019-11-30T15:02:04 #kisslinux <dylanara1> Will fix it. 2019-11-30T15:02:18 #kisslinux <dylanara1> Hang on. 2019-11-30T15:02:26 #kisslinux <dylanara1> I set '-mindepth 1' no? 2019-11-30T15:02:30 #kisslinux <dylanara1> This skips the root. 2019-11-30T15:02:44 #kisslinux <dylanara1> Yu 2019-11-30T15:02:46 #kisslinux <dylanara1> Yup* 2019-11-30T15:03:22 #kisslinux <Crestwave> By root I mean the first directory like `a` not '.` 2019-11-30T15:03:32 #kisslinux <dylanara1> This is a "bug" then as the first 'set' will split on normal 'IFS'. 2019-11-30T15:03:55 #kisslinux <dylanara1> But it's actually fine as the first nest level will never be deeper than a single level. 2019-11-30T15:04:01 #kisslinux <dylanara1> Will fix it anyway of course 2019-11-30T15:04:06 #kisslinux <Crestwave> That's what I'm saying 2019-11-30T15:04:25 #kisslinux <dylanara1> I understand now :P 2019-11-30T15:04:38 #kisslinux <Crestwave> (Referring to the fact that the first nest level will never be deeper than a single level) 2019-11-30T15:05:39 #kisslinux <Crestwave> You may have been confused by the fact that POSIX sets variables set for builtins for the current environment, unlike Bash (in non-POSIX mode). 2019-11-30T15:05:49 #kisslinux <Crestwave> Anyway, going to sleep for real now. Ciao 2019-11-30T15:05:52 #kisslinux <dylanara1> Fixed 2019-11-30T15:05:54 #kisslinux <dylanara1> Ciao