From: bernards () ecn ! nl (Marcel A ! Bernards)
To: tru64-unix-managers
Subject: yppasswd program modification
Date: Tue, 21 Nov 1995 10:42:01 +0000 [thread overview]
Message-ID: <96075325006720.tru64-unix-managers.marc@archive.invalid> (raw)
Hi all OSF managers.
I'm fighting with the Sun yppasswd.x and yppasswd.c from Theo de Raadt <deraadt@fsa.ca>
This source seems to have a slightly different clnt_call rpc call than the one
generated by rpcgen, so I modded the source slightly to use the yppasswd_clnt.c
This all is because I want a modified yppasswd to update multiple domains simultanious.
I can get a working executable and it seems to communicate with yppasswdd, but no update
is done.
This is the part where things seems to go wrong
[ getpass and stuff deleted ]
/* The yppasswd.x file said `unix authentication required',
* so I added it. This is the only reason it is in here.
*/
clnt = clnt_create( master, YPPASSWDPROG, YPPASSWDVERS, "udp" );
clnt->cl_auth = authunix_create_default();
timeout.tv_sec = 25; timeout.tv_usec = 0;
r = yppasswdproc_update_1(&yppasswd,clnt);
if (r) {
clnt_perrno(r);
fprintf( stderr, "\n" );
}
printf("The YP password has%s been changed on %s.\n",
(r) ? " not" : "", master);
auth_destroy( clnt->cl_auth );
clnt_destroy( clnt );
exit ((r) != 0);
}
---
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#include <rpc/rpc.h>
#include "yppasswd.h"
/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };
int *
yppasswdproc_update_1(argp, clnt)
yppasswd *argp;
CLIENT *clnt;
{
static int res;
bzero((char *)&res, sizeof(res));
if (clnt_call(clnt, YPPASSWDPROC_UPDATE, xdr_yppasswd, argp, xdr_int, &res, TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
return (&res);
}
------
Anyone has ever managed to get a working NIS yppasswd program from this sources ?
Thanx in advance.
Marcel Bernards, UNIX & Net sysadm Netherlands Energy Research Foundation ECN
(and SURFnet IC/ICP), Phone: (+31 /0)224 564579 Fax: (+31 /0)224 561864
E-Mail: Bernards@ECN.NL, SnailMail: P.O. Box 1, 1755 ZG Petten
SCREAMNet : AAAAAARGHH!HUH?? : Disclaimer: "The AntiChrist is the Internet !"
reply other threads:[~1995-11-21 10:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox