diff --git a/lib/modules/Protocols.pmod/LPD.pmod b/lib/modules/Protocols.pmod/LPD.pmod index 52e57f44e0078c4aae33a644b4fffc63a40d649a..e72213608a2a50256c4d0957189b3a44c0a64c81 100644 --- a/lib/modules/Protocols.pmod/LPD.pmod +++ b/lib/modules/Protocols.pmod/LPD.pmod @@ -3,7 +3,7 @@ // This is a module for pike. // 3 July 1998 <hww3@riverweb.com> Bill Welliver // -// $Id: LPD.pmod,v 1.3 1998/07/03 20:30:19 grubba Exp $ +// $Id: LPD.pmod,v 1.4 1999/08/20 05:01:58 hubbe Exp $ // class client { @@ -73,7 +73,11 @@ class client { // werror("sent send data command\n"); string control=""; control+="H"+gethostname()+"\n"; - control+="P"+(getpwuid(getuid())[0]||"nobody"); +#if constant(getuid) && constant(getpwuid) + control+="P"+(getpwuid(getuid())[0]||"nobody")+"\n"; +#else + /* Should there be a P-1 here? /Hubbe */ +#endif control+=(jobtype||"l")+"dfA"+ sprintf("%3d%s", jobnum, gethostname())+"\n"; if(jobname) control+="J" + jobname + "\n"; @@ -103,7 +107,11 @@ class client { if(!conn->connect(host, port)) return 0; +#if constant(getpwuid) && constant(getuid) string agent=(getpwuid(getuid())[0]||"nobody"); +#else + string agent="nobody"; +#endif if(job) conn->write(sprintf("%c%s %s %d\n", 05, queue, agent, job)); diff --git a/lib/modules/Protocols.pmod/X.pmod/Auth.pmod b/lib/modules/Protocols.pmod/X.pmod/Auth.pmod index d41e4d0ee8f64128a80fe0fed818b627fc61c58f..aa2b22011220c18d54f589a7b216150ec6403537 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Auth.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Auth.pmod @@ -1,6 +1,6 @@ /* Auth.pmod * - * $Id: Auth.pmod,v 1.4 1998/04/20 01:49:35 nisse Exp $ + * $Id: Auth.pmod,v 1.5 1999/08/20 05:06:33 hubbe Exp $ */ /* @@ -91,7 +91,11 @@ class lock_key int my_hardlink(string from, string to) { +#if constant(hardlink) return !catch(hardlink(from, to)); +#else + return 0; // Failed, hubbe +#endif }