res = (*__key_decryptsession_pk_LOCAL) (geteuid (), arg);
res = (*__key_decryptsession_pk_LOCAL) (__geteuid (), arg);
key_call (u_long proc, xdrproc_t xdr_arg, char *arg,	  xdrproc_t xdr_rslt, char *rslt){  XDR xdrargs;  XDR xdrrslt;  FILE *fargs;  FILE *frslt;  sigset_t oldmask, mask;  union wait status;  int pid;  int success;  uid_t ruid;  uid_t euid;  static char MESSENGER[] = "/usr/etc/keyenvoy";  if (proc == KEY_ENCRYPT_PK && __key_encryptsession_pk_LOCAL)    {      cryptkeyres *res;      res = (*__key_encryptsession_pk_LOCAL) (geteuid (), arg);      *(cryptkeyres *) rslt = *res;      return 1;    }  else if (proc == KEY_DECRYPT_PK && __key_decryptsession_pk_LOCAL)    {      cryptkeyres *res;      res = (*__key_decryptsession_pk_LOCAL) (geteuid (), arg);      *(cryptkeyres *) rslt = *res;      return 1;    }  else if (proc == KEY_GEN && __key_gendes_LOCAL)    {      des_block *res;      res = (*__key_gendes_LOCAL) (geteuid (), 0);      *(des_block *) rslt = *res;      return 1;    }  success = 1;  sigemptyset (&mask);  sigaddset (&mask, SIGCHLD);  sigprocmask (SIG_BLOCK, &mask, &oldmask);  /*   * We are going to exec a set-uid program which makes our effective uid   * zero, and authenticates us with our real uid. We need to make the   * effective uid be the real uid for the setuid program, and   * the real uid be the effective uid so that we can change things back.   */  euid = geteuid ();  ruid = getuid ();  setreuid (euid, ruid);  pid = _openchild (MESSENGER, &fargs, &frslt);  setreuid (ruid, euid);  if (pid < 0)    {      debug ("open_streams");      sigprocmask(SIG_SETMASK, &oldmask, NULL);      return (0);    }  xdrstdio_create (&xdrargs, fargs, XDR_ENCODE);  xdrstdio_create (&xdrrslt, frslt, XDR_DECODE);  if (!xdr_u_long (&xdrargs, &proc) || !(*xdr_arg) (&xdrargs, arg))    {      debug ("xdr args");      success = 0;    }  fclose (fargs);  if (success && !(*xdr_rslt) (&xdrrslt, rslt))    {      debug ("xdr rslt");      success = 0;    }  fclose(frslt); wait_again:  if (wait4(pid, &status, 0, NULL) < 0)    {      if (errno == EINTR)	goto wait_again;      debug("wait4");      if (errno == ECHILD || errno == ESRCH)	perror("wait");      else	success = 0;    }  else    if (status.w_retcode)      {	debug("wait4 1");	success = 0;      }  sigprocmask(SIG_SETMASK, &oldmask, NULL);  return (success);}