Brian : > There is a C-interface called getuserattr(3SECDB) which allows you > to easily access user_attr values. Wouldn't it be better to use this > rather than try to parse the file directly? > I've written this kind of c program by modifying profiles command source code(see attachment). In order to cooperate with gst backend which is in perl, we have to deliver a private binary in this package.
From this two method, I prefer the first one which parse directly /etc/user_attr, doesn't need any private binary and backends itself contain many parts which use this parsing configuration file method. Thanks Jim > Perhaps it would be good to write a small C-program to get the data > you need and use it to get the data you need? > > Brian > > >> The backend cann't get the correct user's profiles, cause 'profiles >> $name' command has change it's format of output. This patch get an >> user's profiles by directly parsing /etc/user_attr file instead of using >> profiles command. >> >> thanks >> >> Jim > -------------- next part -------------- A non-text attachment was scrubbed... Name: profiles.c Type: text/x-csrc Size: 6548 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20090430/26b6de56/attachment.bin>
