!cylwlNXSwagQmZSkzs:matrix.org

Neovim

1319 Members
neovim is a great text editor | https://neovim.io | https://github.com/sponsors/neovim | Bridged to #neovim at irc.libera.chat63 Servers

Load older messages


SenderMessageTime
31 Jan 2023
@ad_chaos:matrix.orgad_chaosah cool00:53:36
@michelesr:matrix.orgmichelesras per running lua as root 00:53:53
@haolian9:matrix.orghaolian9

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:matrix.orgmichelesrwell... if I was concerned about the lua code, I wouldn't even run it as normal user :-) 00:54:15
@ad_chaos:matrix.orgad_chaos an ffi call to? 00:54:33
@ad_chaos:matrix.orgad_chaos * an ffi_call to? 00:54:45
@michelesr:matrix.orgmichelesr 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
@danielhu:matrix.orgthisdanielhu joined the room.00:58:25
@ad_chaos:matrix.orgad_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:matrix.orgad_chaos * haolian9: an ffi_call to? 01:00:01
@ad_chaos:matrix.orgad_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:matrix.orgad_chaos/s01:00:28
@michelesr:matrix.orgmichelesr 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:matrix.orgmichelesr 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:matrix.orgad_chaosah interesting01:03:16
@haolian9:matrix.orghaolian9 *

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:matrix.orgmichelesryeah they have all sort of sandboxing stuff 01:03:49
@michelesr:matrix.orgmichelesr like when you cd into ~/Desktop it asks you permission to see the files in the desktop 01:04:06
@michelesr:matrix.orgmichelesrand so on 01:04:08
@ad_chaos:matrix.orgad_chaosin via sudo?01:04:31
@ad_chaos:matrix.orgad_chaos Every application on macos needs to be explicitly given access to Desktop, Documents and Downloads 01:05:26
@ad_chaos:matrix.orgad_chaosor you can just give it full access to the entire disk if you trust it.01:05:55
@michelesr:matrix.orgmichelesrit 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:matrix.orgad_chaosinteresting01:07:09
@michelesr:matrix.orgmichelesr but maybe it didn't trigger correctly with sudo -e, and so it just denied the permission... not sure 01:07:38
@ad_chaos:matrix.orgad_chaos that's how far I know as well ¯\(ツ)01:08:15
@ad_chaos:matrix.orgad_chaos * that's how far I know as well ¯\_(ツ)_/¯ 01:08:24
@michelesr:matrix.orgmichelesryeah all this sandboxing and mandatory access control stuff is quite confusing 01:08:45
@michelesr:matrix.orgmichelesrjust like SELinux 01:09:01
@michelesr:matrix.orgmichelesrand Android 01:09:18

There are no newer messages yet.


Back to Room List