2003-01-27 08:42:48 -05:00
|
|
|
--- faxd/UUCPLock.c++.orig Thu Sep 21 05:24:54 2000
|
|
|
|
+++ faxd/UUCPLock.c++ Wed Jul 31 12:40:10 2002
|
|
|
|
@@ -37,6 +37,7 @@ extern "C" {
|
1998-09-03 20:35:54 -04:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#include <pwd.h>
|
|
|
|
+#include <grp.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* UUCP Device Locking Support.
|
2003-01-27 08:42:48 -05:00
|
|
|
@@ -143,10 +144,13 @@ UUCPLock::setupIDs()
|
2001-11-18 12:06:51 -05:00
|
|
|
{
|
|
|
|
if (UUCPuid == (uid_t) -1) {
|
|
|
|
const passwd *pwd = getpwnam("uucp");
|
|
|
|
+ const group *grp = getgrnam("dialer");
|
1998-09-03 20:35:54 -04:00
|
|
|
if (!pwd)
|
|
|
|
faxApp::fatal("Can not deduce identity of UUCP");
|
|
|
|
+ if (!grp)
|
|
|
|
+ faxApp::fatal("Can not deduce identity of DIALER");
|
2001-11-18 12:06:51 -05:00
|
|
|
UUCPuid = pwd->pw_uid;
|
|
|
|
- UUCPgid = pwd->pw_gid;
|
1998-09-03 20:35:54 -04:00
|
|
|
+ UUCPgid = grp->gr_gid;
|
2001-11-18 12:06:51 -05:00
|
|
|
endpwent(); // paranoia
|
1998-09-03 20:35:54 -04:00
|
|
|
}
|
|
|
|
}
|