2003-09-23 23:39:46 +02:00
|
|
|
$NetBSD: patch-am,v 1.5 2003/09/23 21:39:48 abs Exp $
|
1999-08-11 08:04:26 +02:00
|
|
|
|
2003-09-23 23:39:46 +02:00
|
|
|
--- faxd/UUCPLock.c++.orig Thu Sep 21 10:24:54 2000
|
|
|
|
+++ faxd/UUCPLock.c++
|
|
|
|
@@ -37,6 +37,7 @@ extern "C" {
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#include <pwd.h>
|
|
|
|
+#include <grp.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* UUCP Device Locking Support.
|
|
|
|
@@ -146,8 +147,13 @@ UUCPLock::setupIDs()
|
|
|
|
if (!pwd)
|
|
|
|
faxApp::fatal("Can not deduce identity of UUCP");
|
|
|
|
UUCPuid = pwd->pw_uid;
|
|
|
|
- UUCPgid = pwd->pw_gid;
|
|
|
|
endpwent(); // paranoia
|
|
|
|
+
|
|
|
|
+ const group *grp = getgrnam(FAX_GROUP);
|
|
|
|
+ if (!grp)
|
|
|
|
+ faxApp::fatal("Can not deduce group identity of '" FAX_GROUP "'");
|
|
|
|
+ UUCPgid = grp->gr_gid;
|
|
|
|
+ endgrent(); // paranoia
|
|
|
|
}
|
|
|
|
}
|
|
|
|
uid_t UUCPLock::getUUCPUid() { setupIDs(); return UUCPuid; }
|