// -*-c++-*- /* $Id: agent.h,v 1.10 2001/08/24 23:03:00 ericp Exp $ */ /* * * Copyright (C) 1999 David Mazieres (dm@uun.org) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * */ #include "arpc.h" #include "sfsmisc.h" #include "sfsagent.h" #include "crypt.h" #include "rxx.h" #include "qhash.h" class rxfilter { rrxx filter; rrxx exclude; public: rxfilter () {} rxfilter (const str &f, const str &e); bool check (const str &n); }; extern vec certprogs; extern vec certfilters; extern vec revokeprogs; extern vec revokefilters; extern bhash norevoke; void runprog (const sfsagent_cmd &av, str target, cbs cb); void sfslookup (str name, cbs cb, u_int certno = 0, str res = NULL); void revcheck (str name, callback::ref cb); struct key { ptr k; sfs_time expire; str comment; list_entry link; }; struct sfsagent { str name; ref x; ptr ac; ptr as; ptr cs; list_entry link; sfsagent (int fd); sfsagent (ref x); ~sfsagent (); void authinit (svccb *sbp); void agentdisp (svccb *sbp); void ctldisp (svccb *sbp); void dispatch (svccb *sbp); void setname (str name); }; extern list agents; extern list keys; extern key *keynum (u_int n); void agentmsg (u_int32_t proc, const void *arg = NULL); /* agentrex.C */ typedef callback >::ref cb_rex; void rex_connect (str path, str frompath, bool forwardagent, cb_rex::ptr cb); void list_rexsess (svccb *sbp); bool kill_rexsess (str schost);