tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* yppasswd program modification
@ 1995-11-21 10:42 bernards
  0 siblings, 0 replies; only message in thread
From: bernards @ 1995-11-21 10:42 UTC (permalink / raw)
  To: tru64-unix-managers

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 !" 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-11-21 10:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-21 10:42 yppasswd program modification bernards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox