[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
I am trying to fix cap_mkdb bug (PR #32591), I found that cap_mkdb wont
update a .db file if it already exist. A simple workaround is to remove
.db file before using cap_mkdb.
The problem is inside db_bulid(const char **) function (cap_mkdb.c) - it
calls cgetnext(3), next cgetnext(3) calls function getent
(/usr/src/lib/libc/gen/getcap.c). Comment about getent function says:
'Getent implements the functions of cgetent. [...]'
and man cgetent(3) says:
'cgetent() extracts the capability name from the database specified
by the NULL terminated file array db_array and returns a pointer to a
malloc(3)'d copy of it in buf. cgetent() will first look for files
ending in .db (see cap_mkdb(1)) before accessing the ASCII file'
Now source of bug seems to be obvious, but if I try to put even little
changes to cap_mkdb.c resulting login.conf.db looks like broken - users
Aug 6 13:47:25 kraina-oz login: pam_acct_mgmt: error in service module
Aug 6 13:48:08 kraina-oz login: lamers: unknown class
Can someone give me some hint to where start digging why I cant modify
Main Index |
Thread Index |