9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] u9fs bug
@ 2003-05-23 15:51 David Swasey
  0 siblings, 0 replies; only message in thread
From: David Swasey @ 2003-05-23 15:51 UTC (permalink / raw)
  To: 9fans

In u9fs.c, gid2user() may return nil but groupchange() assumes g is
always non-nil.  This causes u9fs to seg fault when, for example,
creating a file in a directory that has a group id not defined in
/etc/group.  A simple fix is to have groupchange() handle the case
when g is nil:

/sys/src/cmd/unix/u9fs/u9fs.c:1320 a u9fs.c:1321,1322
> 	if(g == nil)
> 		return -1;

-dave



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-23 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-23 15:51 [9fans] u9fs bug David Swasey

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).