31 Jan 2023 |
ad_chaos | ah cool | 00:53:36 |
michelesr | as per running lua as root | 00:53:53 |
haolian9 | ad_chaos: in case you are interested, i settled on this approach with an unsafe ffi call:
local bufnr = the_term_buf_i_created
api.nvim_create_autocmd("TermClose", {
buffer = bufnr,
once = true,
callback = function(args)
api.nvim_buf_call(bufnr, function()
ffi_call.prepare_help_buffer()
end)
end,
})
| 00:53:59 |
michelesr | well... if I was concerned about the lua code, I wouldn't even run it as normal user :-) | 00:54:15 |
ad_chaos | an ffi call to? | 00:54:33 |
ad_chaos | * an ffi_call to? | 00:54:45 |
michelesr | also, sometimes sudo -e gives me an error on OS X (permission denied) while sudo nvim works just fine... not sure why, something to do with the sudoedit_checkdir option | 00:57:59 |
| thisdanielhu joined the room. | 00:58:25 |
ad_chaos | I wonder if this investigation is for educational reasons or are you trying to be the malicious actor on your friend's machine or something... | 00:59:26 |
ad_chaos | * haolian9: an ffi_call to? | 01:00:01 |
ad_chaos | * I wonder if this investigation is for educational reasons or are you trying to be the malicious actor on your friend's machine or something 🤔 | 01:00:15 |
ad_chaos | /s | 01:00:28 |
michelesr | nah, it all started because I wanted to add fingerprint authentication for sudo and sudo -e /etc/pam.d/sudo failed with permission denied | 01:01:36 |
michelesr | then I was like, that must be the mandatory access control layer in OS X, but then I tried to edit with sudo nvim and it just worked (although the OS GUI prompted me to confirm the change when saving with :w! ) | 01:02:35 |
ad_chaos | ah interesting | 01:03:16 |
haolian9 | * ad_chaos: in case you are interested, i settled on this approach with an unsafe ffi call:
local bufnr = the_term_buf_i_created
api.nvim_create_autocmd("TermClose", {
buffer = bufnr,
once = true,
callback = function(args)
api.nvim_buf_call(bufnr, function()
a_module_which_emits_ffi_calls.prepare_help_buffer()
end)
end,
})
| 01:03:45 |
michelesr | yeah they have all sort of sandboxing stuff | 01:03:49 |
michelesr | like when you cd into ~/Desktop it asks you permission to see the files in the desktop | 01:04:06 |
michelesr | and so on | 01:04:08 |
ad_chaos | in via sudo? | 01:04:31 |
ad_chaos | Every application on macos needs to be explicitly given access to Desktop , Documents and Downloads | 01:05:26 |
ad_chaos | or you can just give it full access to the entire disk if you trust it. | 01:05:55 |
michelesr | it looks like there's an additional confirmation prompt that pops up when you try to edit important system files (as root) | 01:06:30 |
ad_chaos | interesting | 01:07:09 |
michelesr | but maybe it didn't trigger correctly with sudo -e , and so it just denied the permission... not sure | 01:07:38 |
ad_chaos | that's how far I know as well ¯\(ツ)/¯ | 01:08:15 |
ad_chaos | * that's how far I know as well ¯\_(ツ)_/¯ | 01:08:24 |
michelesr | yeah all this sandboxing and mandatory access control stuff is quite confusing | 01:08:45 |
michelesr | just like SELinux | 01:09:01 |
michelesr | and Android | 01:09:18 |