X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=common.h;h=e8f5b38c288af9dec5d543d0677433c80fda0db4;hb=5c38f6a9b5774073832e2b483b0c01b4f3261cb5;hp=f73ea4d876c73da5780310d1369ba3f3152cfe32;hpb=d9cedcfbd2194ff9046d71400cb7878085c26499;p=userv.git diff --git a/common.h b/common.h index f73ea4d..e8f5b38 100644 --- a/common.h +++ b/common.h @@ -2,7 +2,7 @@ * userv - common.h * definitions shared between client and daemon * - * Copyright (C)1996-1997 Ian Jackson + * Copyright (C)1996-1997,1999,2012 Ian Jackson * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by @@ -22,6 +22,10 @@ #ifndef COMMON_H #define COMMON_H +#define COPYRIGHT(indent,nl) \ + indent "Copyright (C)1996-2012 Ian Jackson; copyright (C)2000 Ben Harris." nl \ + indent "there is NO WARRANTY; type `userv --copyright' for details." nl + #define PCSUMSIZE 16 static const unsigned char protocolchecksumversion[PCSUMSIZE]= { @@ -77,22 +81,22 @@ enum { struct opening_msg { unsigned long magic; unsigned char protocolchecksumversion[PCSUMSIZE]; - pid_t serverpid; + pid_t overlordpid, serverpid; }; struct request_msg { unsigned long magic; - pid_t clientpid; + pid_t clientpid; /* or -1 if no service is required and this was a version check */ int serviceuserlen; int servicelen; - int lognamelen; + int loginnamelen, spoofed; /* spoofed is 0 or 1 */ int cwdlen, overridelen; uid_t callinguid; int ngids, nreadfds, nwritefds, nargs, nvars; /* Followed by: * serviceuserlen bytes for the service user (unterminated) * servicelen bytes for the service (unterminated) - * lognamelen bytes for the login name (unterminated) + * loginnamelen bytes for the login name (unterminated) * cwdlen bytes for the cwd (unterminated) * overridelen bytes for the override data (with extra \n but unterminated), * or nothing if overridelen==-1