HylaFAXServer::booltag HylaFAXServer::booleans[] = {
{ "allowsorting", &HylaFAXServer::allowSorting, true },
{ "publicjobq", &HylaFAXServer::publicJobQ, false },
+{ "publicrecvq", &HylaFAXServer::publicRecvQ, false },
};
void
time_t denyTime; // time to deny service
u_int jobProtection; // Protection to use on Jobs
bool publicJobQ; // Public/protection on recvq?
+ bool publicRecvQ; // Public/protection on recvq?
bool allowSorting; // Allow client to make us sort
/*
* User authentication and login-related state.
}
bool
-HylaFAXServer::isVisibleRecvQFile(const char* filename, const struct stat&)
+HylaFAXServer::isVisibleRecvQFile(const char* filename, const struct stat& sb)
{
- return (strncmp(filename, "fax", 3) == 0);
+ return (strncmp(filename, "fax", 3) == 0) && (publicRecvQ || checkFileRights(R_OK, sb) );
}
RecvInfo*
struct dirent* dp;
while ((dp = readdir(dir))) {
struct stat sb;
- if (!isVisibleRecvQFile(dp->d_name, sb))
- continue;
fxStr qfile(path | dp->d_name);
RecvInfo* rip;
- if (FileCache::update(qfile, sb) && (rip = getRecvInfo(qfile, sb))) {
+ if (!FileCache::update(qfile, sb))
+ continue;
+ if (!isVisibleRecvQFile(dp->d_name, sb))
+ continue;
+ rip = getRecvInfo(qfile, sb);
+ if (rip) {
if (recvSortFormat.length() == 0) {
Rprintf(fd, recvFormat, *rip, sb);
fputs("\r\n", fd);