4 * CAPS-Encode the passwd structure for the specified usernames, generate
7 * $DragonFly: src/test/caps/encoder.c,v 1.1 2004/03/07 23:36:45 dillon Exp $
10 #include <libcaps/caps_struct.h>
16 main(int ac
, char **av
)
22 for (i
= 1; i
< ac
; ++i
) {
25 if ((pw
= getpwnam(av
[i
])) == NULL
) {
26 printf("%s: lookup failed\n");
29 n
= caps_encode(buf
, sizeof(buf
), pw
, &caps_passwd_struct
);
30 if (n
> sizeof(buf
)) {
31 printf("buffer overflow during encoding\n");