smbd tries to read ~root/* files

Michael Tokarev mjt at tls.msk.ru
Fri Apr 14 07:30:00 UTC 2023


13.04.2023 21:56, Michael Tokarev via samba-technical пишет:
> While debugging an unrelated issue, I noticed some interesting things
> in smbd strace.  Here's one example:
> 
..
> openat(AT_FDCWD, "/root/.krb5/config", O_RDONLY) = -1 ENOENT
> openat(AT_FDCWD, "/etc/krb5.conf", O_RDONLY) = 4

> openat(AT_FDCWD, "/root/.hx509/config", O_RDONLY) = -1 ENOENT
> openat(AT_FDCWD, "/etc/hx509.conf", O_RDONLY) = -1 ENOENT
> 
> I *guess* this comes from heimdal code (but I might be wrong),
> and I think this is quite wrong to use ~root for samba configuration.

This is heimdal indeed,

lib/hx509/cert.c, heim_get_default_config_files(hx509_config_file, ...) and
lib/krb5/context.c, heim_prepend_config_files_default(filelist, krb5_config_file,..) and
lib/krb5/context.c, heim_get_default_config_files(krb5_config_file, "KRB5_CONFIG", ...).

(the *_config_file refers to ~/foo).

/mjt



More information about the samba-technical mailing list