public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mingli.yu at windriver dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug nscd/29402] nscd: No such file or directory Date: Wed, 10 Aug 2022 03:00:09 +0000 [thread overview] Message-ID: <bug-29402-131-xQWxDZCX3a@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29402-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29402 --- Comment #2 from Mingli <mingli.yu at windriver dot com> --- And add some debug info as below. # vi nss/nss_files/files-init.c [snip] static void register_file (void (*cb) (size_t, struct traced_file *), int db, const char *path, int crinit) { size_t pathlen = strlen (path) + 1; struct traced_file *file = malloc (sizeof (struct traced_file) + pathlen); /* Do not register anything on memory allocation failure. nscd will fail soon anyway. */ if (file != NULL) { init_traced_file (file, path, crinit); syslog (LOG_NOTICE, "in register_file before %s %p", file->fname, file); cb (db, file); syslog (LOG_NOTICE, "in register_file after %s %p", file->fname, file); } } [snip] # vi nscd/connections.c [snip] void register_traced_file (size_t dbidx, struct traced_file *finfo) { /* If the database is disabled or file checking is disabled then ignore the registration. */ dbg_log("in register_traced_file %s %p", finfo->fname, file); [snip] Install the patched nscd and run "systemctl status nscd" # cat /var/log/syslog [snip] 2022-08-10T08:28:49.403612+00:00 intel-x86-64 nscd: in register_file before /etc/passwd 0x56610fe0 2022-08-10T08:28:49.411267+00:00 intel-x86-64 nscd: in register_traced_file /passwd 0x56610fe0 2022-08-10T08:28:49.403612+00:00 intel-x86-64 nscd: in register_file after /etc/passwd 0x56610fe0 [snip] It turns out the pointer address is the same as 0x56610fe0 for file both in function register_file and register_traced_file. But the contents of file->fname is different. Confusing about the different behavior and I think it should be same for file->fname. Why it is different? Any hints? -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-08-10 3:00 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-25 9:30 [Bug nscd/29402] New: " mingli.yu at windriver dot com 2022-07-26 2:48 ` [Bug nscd/29402] " mingli.yu at windriver dot com 2022-08-10 3:00 ` mingli.yu at windriver dot com [this message] 2022-10-25 19:54 ` zev+sourcewarebz at bewilderbeest dot net 2022-10-25 20:01 ` zev+sourcewarebz at bewilderbeest dot net 2022-10-26 13:40 ` rwmacleod at gmail dot com 2022-12-09 14:34 ` adhemerval.zanella at linaro dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-29402-131-xQWxDZCX3a@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).