[1902] in NetBSD-Development
More problems
daemon@ATHENA.MIT.EDU (Charles M. Hannum)
Wed Aug 18 19:19:39 1999
Date: Wed, 18 Aug 1999 19:19:30 -0400 (EDT)
From: "Charles M. Hannum" <root@ihack.net>
To: netbsd-dev@MIT.EDU
1) I got bitten by another piece of DB lossage. libal uses dbopen(3)
directly, which causes telnetd and login to never find the user in
the pw file. I kluged libal to use _dbopen(), and it works.
2) There's an off-by-one error in telnetd/login's utmp handling. To
wit:
mycroft p0 r94aag002979.sbo 1:11PM 6 sh
mycroft p1 r94aag002979.sbo 3:42PM 5 ./mf \\batchmode; \\mode=ljfour; \\m
mycroft p2 r94aag002979.sb 6:41PM 0 w
3) I get:
quota in free(): warning: chunk is already free.
attach in free(): warning: chunk is already free.
every time I run the Athena quota or attach. This comes from
locker__canonicalize_path(), which free()s the same string twice.
This is a trivial logic error; `path' is initialized from `*pathp',
and every time it's changed, the old `path' is freed. Then at the
end, it does:
if (path != *pathp)
{
free(*pathp);
*pathp = path;
}
This bit is unnecessary, since the old string is already freed.
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
Index: util.c
===================================================================
RCS file: /afs/dev.mit.edu/project/sipb/repository/athena/lib/al/util.c,v
retrieving revision 1.1.1.4
diff -c -2 -r1.1.1.4 util.c
*** util.c 1998/05/14 21:25:38 1.1.1.4
--- util.c 1999/08/18 22:27:12
***************
*** 124,130 ****
/* Open the insecure or secure database depending on whether we're root. */
! db = dbopen(_PATH_SMP_DB, O_RDONLY, 0, DB_HASH, NULL);
if (!db)
! db = dbopen(_PATH_MP_DB, O_RDONLY, 0, DB_HASH, NULL);
if (!db)
return NULL;
--- 124,130 ----
/* Open the insecure or secure database depending on whether we're root. */
! db = _dbopen(_PATH_SMP_DB, O_RDONLY, 0, DB_HASH, NULL);
if (!db)
! db = _dbopen(_PATH_MP_DB, O_RDONLY, 0, DB_HASH, NULL);
if (!db)
return NULL;
Index: mountpoint.c
===================================================================
RCS file: /afs/dev.mit.edu/project/sipb/repository/athena/lib/locker/mountpoint.c,v
retrieving revision 1.1.1.3
diff -c -2 -r1.1.1.3 mountpoint.c
*** mountpoint.c 1999/06/07 23:02:48 1.1.1.3
--- mountpoint.c 1999/08/18 23:10:21
***************
*** 323,331 ****
*p = '\0';
- if (path != *pathp)
- {
- free(*pathp);
- *pathp = path;
- }
if (buildfromp)
{
--- 323,326 ----
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----