Rehs, Philipp Helo
2018-Sep-03 07:05 UTC
[Samba] smbclient changed behaviour authentication-file
Hello, thank you for this information. Do you have any idea for an workaround? Kind regards Philipp Rehs Am Freitag, den 31.08.2018, 13:28 -0700 schrieb Jeremy Allison:> On Fri, Aug 31, 2018 at 08:07:27PM +0000, Rehs, Philipp Helo via > samba wrote: > > Hello, > > > > we are using Sambadav[1] with Samba 4.4 in our university, which > > relays > > on authentication-file with giving it a file descriptor. > > > > After 4.4 this does not any more and requires a filename. > > > > Is there something documented about this behaviour? > > > > Is there a new way to pass a file descriptor for authentication? > > > > Kind regards > > Philipp rehs > > It is now calling cli_credentials_parse_file(), > which uses the standard function fd_load() > to load the credentials from a file. > > This does an fstat() on the file and sets > the size to read as size = sbuf.st_size. > > I'm guessing that is what is failing now > for you, as the size is now being set as > zero on a fd /proc/self/fd/XXX path.-- Heinrich-Heine-Universität Düsseldorf Zentrum für Informations- und Medientechnologie Kompetenzzentrum für wissenschaftliches Rechnen und Speichern Universitätsstraße 1 Gebäude 25.41 Raum 00.51 Telefon: +49-211-81-15557 Mail: Philipp.Rehs at uni-duesseldorf.de -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5053 bytes Desc: not available URL: <http://lists.samba.org/pipermail/samba/attachments/20180903/ad2e5327/smime.bin>
Jeremy Allison
2018-Sep-04 20:44 UTC
[Samba] smbclient changed behaviour authentication-file
On Mon, Sep 03, 2018 at 07:05:19AM +0000, Rehs, Philipp Helo via samba wrote:> Hello, > > thank you for this information. > > Do you have any idea for an workaround?Hmmm. This isn't an easy fix. The calling code will have to change to write the auth data into a file and delete afterwards. file_lines_load() is just too convenient to stop using for a case like this I'm afraid.
Andrew Bartlett
2018-Sep-04 21:44 UTC
[Samba] smbclient changed behaviour authentication-file
On Tue, 2018-09-04 at 13:44 -0700, Jeremy Allison via samba wrote:> On Mon, Sep 03, 2018 at 07:05:19AM +0000, Rehs, Philipp Helo via samba wrote: > > Hello, > > > > thank you for this information. > > > > Do you have any idea for an workaround? > > Hmmm. This isn't an easy fix. The calling code > will have to change to write the auth data > into a file and delete afterwards. > > file_lines_load() is just too convenient to > stop using for a case like this I'm afraid.Can't fd_load(0) in util_file.c be rewritten with a read/realloc loop if size is 0 or isn't a regular file? 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