SetPrinter fails (panics) as non root
setup a simple share:
printable = yes
call "rpcclient localhost -U user_with_printop_priv%pass -c "setprinter printername randomcomment"
Created attachment 4442 [details]
Patch for 3.4.1.
Missing become_root() calls around reload_services. Needs to be in 3.4.1.
Created attachment 4443 [details]
git-am format patch for v3-4-test tree.
Please review then re-assign to Karolin, thanks !
The one I'm not sure about is the one in smbconf_reloaded(). Does that also fix a panic with setprinter, or is that just "reload_services must always be done as root"? If so, why don't you put the [un]become_root pair into that routine?
That's more change than I wanted to put into 3.4.1. For master IMHO we should revisit the comment in the S3 events code that talks about all message callbacks being run as root rather than fixing them individually.
Sorry, I don't understand. https://bugzilla.samba.org/attachment.cgi?id=4443, the patch you want me to ack for 3.4.1, does contain 3 hunks: 2 [un]become_root pairs, and one change_to_root_user() in smb_conf_updated. How does the latter fix a bug with setprinter()?
Calling smb_conf_updated (via a message) crashes when not called as root. That was the actual backtrace of the crash bug (it gets called async via the message sent to all smbd's as well as directly from the printer code). The two become_root()/unbecome_root() pairs were the obvious part of the fix.
Ok, just put it in. I did not see the backtrace though, but if you say it's required, then it must be in.
Yes it's required. I created the backtrace myself (but didn't attach to the bugreport, sorry). It's already in master.
Pushed, patch will be included in 3.4.1.
Closing out bug report.