Miguel Medalha
2016-Mar-20 18:57 UTC
[Samba] [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
>>> When building Samba 4.4.0rc and then doing an install to >>> /usr/local/samba, a directory "libexec" is being created which then >>> contains a "samba" directory with a single "smbspool_krb5_wrapper" >>> file inside (/usr/local/samba/libexec/samba/ >>> smbspool_krb5_wrapper). This is not very clean, is it? >>> >>> Since all the files are already inside /usr/local/samba, why repeat >>> "samba" again inside the tree? Is it possible to clean this before >>> the final release of Samba 4.4.0? >>> >>> This doesn't happen with version 4.3.6. The same file is placed in >>> "/usr/local/samba/bin/smbspool_krb5_wrapper". >> Some additional information: if I configure the build with >> "--libexecdir=/usr/local/samba/bin" the file goes into >> "usr/local/samba/bin/samba/smbspool_krb5_wrapper" which also contains >> an >> unnecessary repetition. That additional "samba" directory seems to be >> hard coded somewhere. > Try this patch.Thank you for writing the patch. Maybe I am being picky or (most probably) ignoring some valid motive, but why does "smbspool_krb5_wrapper" need a "libexec" directory just for itself? Was there something wrong with keeping this file in "/usr/local/samba/bin" as it happened with samba 4.3.6? Why complicate the tree?
Rowland penny
2016-Mar-20 19:20 UTC
[Samba] [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
On 20/03/16 18:57, Miguel Medalha wrote:> >>>> When building Samba 4.4.0rc and then doing an install to >>>> /usr/local/samba, a directory "libexec" is being created which then >>>> contains a "samba" directory with a single "smbspool_krb5_wrapper" >>>> file inside (/usr/local/samba/libexec/samba/ >>>> smbspool_krb5_wrapper). This is not very clean, is it? >>>> >>>> Since all the files are already inside /usr/local/samba, why repeat >>>> "samba" again inside the tree? Is it possible to clean this before >>>> the final release of Samba 4.4.0? >>>> >>>> This doesn't happen with version 4.3.6. The same file is placed in >>>> "/usr/local/samba/bin/smbspool_krb5_wrapper". >>> Some additional information: if I configure the build with >>> "--libexecdir=/usr/local/samba/bin" the file goes into >>> "usr/local/samba/bin/samba/smbspool_krb5_wrapper" which also contains >>> an >>> unnecessary repetition. That additional "samba" directory seems to be >>> hard coded somewhere. >> Try this patch. > > Thank you for writing the patch. > > Maybe I am being picky or (most probably) ignoring some valid motive, > but why does "smbspool_krb5_wrapper" need a "libexec" directory just > for itself? Was there something wrong with keeping this file in > "/usr/local/samba/bin" as it happened with samba 4.3.6? Why complicate > the tree? > >This appears to be from FHS and is optional, libexec is supposed to be for binaries that are not meant to be run by a user or a shell script, they are only meant to be run by other programs. As I said libexec is optional, it is so optional, that I have never found it on a Debian machine :-D Rowland
Miguel Medalha
2016-Mar-20 19:34 UTC
[Samba] [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
> This appears to be from FHS and is optional, libexec is supposed to be > for binaries that are not meant to be run by a user or a shell script, > they are only meant to be run by other programs. > > As I said libexec is optional, it is so optional, that I have never > found it on a Debian machine :-D >This looks very inelegant to me. The line install_path='${LIBEXECDIR}' (or "install_path='${LIBEXECDIR}/samba'," as it was before) seems to have been included as an exception just for that 'smbspool_krb5_wrapper' particular file. Why not maintain the behavior of Samba 4.3.x and keep that file in "bin"? Is that the only binary "meant to be run by other programs"?
Andrew Bartlett
2016-Mar-20 21:08 UTC
[Samba] [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
On Sun, 2016-03-20 at 18:57 +0000, Miguel Medalha wrote:> > > Thank you for writing the patch. > > Maybe I am being picky or (most probably) ignoring some valid > motive, > but why does "smbspool_krb5_wrapper" need a "libexec" directory just > for > itself? Was there something wrong with keeping this file in > "/usr/local/samba/bin" as it happened with samba 4.3.6? Why > complicate > the tree?Binaries that should not be executed by the user/administrator do not belong in bin, they belong in libexec, per long tradition (but not the current FHS, oddly). It is in the 3.0 rc2 version here: https://www.linuxbase.org/betaspecs/fhs/fhs/ch04s07.html If you need a rationale, it could be not to put in the path things that the admin or user should not directly execute. Andrew Bartlett -- Andrew Bartlett https://samba.org/~abartlet/ Authentication Developer, Samba Team https://samba.org Samba Development and Support, Catalyst IT https://catalyst.net.nz/services/samba
Miguel Medalha
2016-Mar-20 21:30 UTC
[Samba] [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
> If you need a rationale, it could be not to put in the path things that > the admin or user should not directly execute.Yes, put in that way it makes perfect sense. Anyway, thanks for your patch. The thing is cleaner now.
Reasonably Related Threads
- [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
- [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
- [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
- [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4
- [WIP][PATCH] 'fix' smbspool_krb5_wrapper, libexecdir and ctdb helper binary locations for 4.4