From: boehm.igor@gmail.com
To: 9front@9front.org
Subject: Re: [9front] kbdfs broken after new kernel build
Date: Tue, 22 Dec 2020 13:57:41 +0100 [thread overview]
Message-ID: <8346FB2C661CAB4E1B93DBA3EE06E0B9@gmail.com> (raw)
In-Reply-To: <84F5C7BED2BA9DFEABB969E4E8E00C58@prosimetrum.com>
The diff has added a static variable 'user' to the fillstat() function:
1.6 char *mntpt = "/dev";
1.7+char *user;
...
1.37 static int
1.38 fillstat(ulong qid, Dir *d)
1.39 {
1.40+ static char *user;
^^^^^^^^^^^^^^^^^^
1.41 struct Qtab *t;
1.42
1.43 memset(d, 0, sizeof *d);
1.44- d->uid = getauser();
1.45- d->gid = getauser();
1.46+ d->uid = d->gid = user;
The function static variable user shadows the global user variable and is not being initialised:
kbdfs.c:107 char *user;
...
kbdfs.c:1257 static int
kbdfs.c:1258 fillstat(ulong qid, Dir *d)
kbdfs.c:1259 {
kbdfs.c:1260 static char *user;
^^^^^^^^^^^^^^^^^^
kbdfs.c:1261 struct Qtab *t;
kbdfs.c:1262
kbdfs.c:1263 memset(d, 0, sizeof *d);
kbdfs.c:1264 d->uid = d->gid = user;
^^^^^^^^^^^^^^^^^^^^^^^
Maybe line 'kbdfs.c:1260' is the culprit?
Cheers,
Igor
> err, rather, this change:
>
> changeset: 8191:8eefeaac58c7
> user: cinap_lenrek@felloff.net
> date: Sat Dec 19 15:52:41 2020 +0100
> summary: aux/kbdfs: use getuser() from libc
>
> can confirm that hg revert -r 8a74c22c68dd kbdfs.c fixes the problem.
>
> umbraticus
next prev parent reply other threads:[~2020-12-22 13:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 8:04 umbraticus
2020-12-22 8:25 ` umbraticus
2020-12-22 9:04 ` umbraticus
2020-12-22 9:23 ` umbraticus
2020-12-22 12:57 ` boehm.igor [this message]
2020-12-22 15:37 ` cinap_lenrek
2020-12-22 18:19 ` umbraticus
2020-12-22 15:38 ` cinap_lenrek
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=8346FB2C661CAB4E1B93DBA3EE06E0B9@gmail.com \
--to=boehm.igor@gmail.com \
--cc=9front@9front.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: link
Be 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 NNTP newsgroup(s).