Skip to content
Snippets Groups Projects
Commit 936efba3 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bugfix? for NT

Rev: lib/modules/Protocols.pmod/LPD.pmod:1.4
Rev: lib/modules/Protocols.pmod/X.pmod/Auth.pmod:1.5
parent e2555353
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// This is a module for pike. // This is a module for pike.
// 3 July 1998 <hww3@riverweb.com> Bill Welliver // 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 { class client {
...@@ -73,7 +73,11 @@ class client { ...@@ -73,7 +73,11 @@ class client {
// werror("sent send data command\n"); // werror("sent send data command\n");
string control=""; string control="";
control+="H"+gethostname()+"\n"; 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"; control+=(jobtype||"l")+"dfA"+ sprintf("%3d%s", jobnum, gethostname())+"\n";
if(jobname) if(jobname)
control+="J" + jobname + "\n"; control+="J" + jobname + "\n";
...@@ -103,7 +107,11 @@ class client { ...@@ -103,7 +107,11 @@ class client {
if(!conn->connect(host, port)) if(!conn->connect(host, port))
return 0; return 0;
#if constant(getpwuid) && constant(getuid)
string agent=(getpwuid(getuid())[0]||"nobody"); string agent=(getpwuid(getuid())[0]||"nobody");
#else
string agent="nobody";
#endif
if(job) if(job)
conn->write(sprintf("%c%s %s %d\n", 05, queue, agent, job)); conn->write(sprintf("%c%s %s %d\n", 05, queue, agent, job));
......
/* Auth.pmod /* 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 ...@@ -91,7 +91,11 @@ class lock_key
int my_hardlink(string from, string to) int my_hardlink(string from, string to)
{ {
#if constant(hardlink)
return !catch(hardlink(from, to)); return !catch(hardlink(from, to));
#else
return 0; // Failed, hubbe
#endif
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment