On Wed, 15 Aug 2007, Sebastian Reitenbach wrote:
> Hi,
>
> I am working on porting linux-ha to OpenBSD. The management daemon uses pam
> to authenticate users. I tried changing it to use bsd_auth on OpenBSD,
> especially auth_userok as described in authenticate(3).
>
> I added this to the sources of the mgmtd.c file:
>
> #include <bsd_auth.h>
> #include <login_cap.h>
>
> the following is the line 486 from mgmtd.c:
> if (auth_userok(args[1],NULL,NULL,args[2]) !=
> 0 || !usr_belong_grp(args[1],ALLOW_GRP)) {
>
> on compiling, the following error comes up:
> mgmtd.c: In function `on_listen':
> mgmtd.c:486: warning: implicit declaration of function `auth_userok'
>
> and linking fails with:
> mgmtd.o(.text+0x8e2): In function `on_listen':
> /usr/ports/sysutils/heartbeat/w-heartbeat-2.1.2/heartbeat-2.1.2/mgmt/daemon/mgmtd.c:486:
>
> undefined reference to `auth_userok'
> collect2: ld returned 1 exit status
>
> I am still missing a piece, I know it must be sth. simple, but I don't see
> whats missing, any hint?
How about spelling it as auth_userokay ?
-Otto