version 1.1, 2005/02/22 22:33:01 |
version 1.2, 2005/02/22 22:36:09 |
|
|
#include "log.h" |
#include "log.h" |
#include "cvs.h" |
#include "cvs.h" |
#include "cvsd.h" |
#include "cvsd.h" |
#include "cvspr.h" |
|
|
|
|
|
|
|
|
|
|
|
static int cvsd_privfd = -1; |
static int cvsd_privfd = -1; |
static char cvsd_root[MAXPATHLEN]; |
static char cvsd_root[MAXPATHLEN]; |
static char *cvsd_motd; |
static uid_t cvsd_uid = 0; |
static uid_t cvsd_uid = -1; |
static gid_t cvsd_gid = 0; |
static gid_t cvsd_gid = -1; |
|
|
|
|
|
/* session info */ |
/* session info */ |
|
|
} |
} |
|
|
return ((int)ret); |
return ((int)ret); |
} |
|
|
|
|
|
/* |
|
* cvsd_child_reqhdlr() |
|
* |
|
*/ |
|
int |
|
cvsd_child_reqhdlr(struct cvsp_req *req) |
|
{ |
|
int ret; |
|
|
|
switch (req->req_code) { |
|
case CVSP_REQ_MOTD: |
|
ret = cvs_proto_sendresp(cvsd_sess_fd, CVSP_RESP_DONE, |
|
cvsd_motd, strlen(cvsd_motd) + 1); |
|
break; |
|
case CVSP_REQ_VERSION: |
|
case CVSP_REQ_GETMSG: |
|
case CVSP_REQ_SETMSG: |
|
default: |
|
ret = cvs_proto_sendresp(cvsd_sess_fd, CVSP_RESP_INVREQ, |
|
req->req_seq, NULL, 0); |
|
} |
|
|
|
return (ret); |
|
} |
} |