Re: Unable to find pw entry for uid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Aurelien

aweseom thanks for this!
>You should try to attach gdb to the cifs.upcall process

stepping through with a debugger was the "next level" i was thinking
of attempting but couldnt work out how to get GDB to hook into the
process.

one more newbie question:

I guess after i make the change in the cifs.upcall.c file i need to
autoreconf /config /make /make install ?
is it correct that this will overwrite all the files from the
cifs-utils package on my machine?

Cheers

On Thu, 6 May 2021 at 14:42, Aurélien Aptel <aaptel@xxxxxxxx> wrote:
>
> Hi Calvin,
>
> Calvin Chiang <calvin.chiang@xxxxxxxxx> writes:
> > Now oddly the strerror(errno) is actually returning SUCCESS
> > But the pw = getpwuid(uid); is failing.
> > Getpwuid(uid) is calling nss.
>
> ...
>
> > and the output from the sssd_nss.log is:
>
> ...
>
> >     (Mon May  3 13:05:12 2021) [sssd[nss]]
> > [cache_req_search_ncache_filter] (0x0400): CR #114: Filtering out
> > results by negative cache
> >
> >     (Mon May  3 13:05:12 2021) [sssd[nss]] [sss_ncache_check_str]
> > (0x2000): Checking negative cache for
> > [NCE/USER/cyberloop.local/alice@cyberloop.local]
> >
> >     (Mon May  3 13:05:12 2021) [sssd[nss]]
> > [cache_req_create_and_add_result] (0x0400): CR #114: Found 1 entries
> > in domain cyberloop.local
>
> I don't know much about sssd but if it's finding 1 entry in the
> *negative* cache that means it knows it doesn't exist. (I'm assuming
> negative cache means cache of queries that have no results)
>
> That being said I've had issue with getpwuid() before that were solved
> by updating glibc. Could be totally unrelated to your problem though.
>
> You should try to attach gdb to the cifs.upcall process. You can do this
> by adding
>
>     syslog(LOG_ERR, "my pid is %d", getpid());
>     sleep(5);
>
> in cifs.upcall.c before the getpwuid() call. Then try triggering the
> mount. It should block because of the sleep(). In a different terminal,
> look at your system journal for the PID, and run gdb -p $pid. From there
> you will be able to step into the getpwuid (glibc), nss, sss, calls.
>
> If your linux distribution has a debug symbol server setup for gdb to
> use, gdb will dynamically fetch symbols and source code on the
> fly. Otherwise you will probably need to install debug and source
> packages for glibc, nss and sssd packages to be able to see function
> names and source code in gdb.
>
> Cheers,
> --
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
> SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
> GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
>




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux