source: branches/2.4/patches/2.5/fix_mom_priv.patch @ 82

Last change on this file since 82 was 82, checked in by bas, 11 years ago

Add security patch for fix_mom_priv and changelog adjustment

File size: 847 bytes
RevLine 
[82]1diff --git a/src/server/process_request.c b/src/server/process_request.c
2index f433cbf..133cecd 100644
3--- a/src/server/process_request.c
4+++ b/src/server/process_request.c
5@@ -678,6 +678,21 @@ void process_request(
6         log_buffer);
7       }
8 
9+    if (svr_conn[sfds].cn_authen != PBS_NET_CONN_FROM_PRIVIL)
10+      {
11+      sprintf(log_buffer, "request type %s from host %s rejected (connection not privileged)",
12+        reqtype_to_txt(request->rq_type),
13+        request->rq_host);
14+
15+      log_record(PBSEVENT_JOB, PBS_EVENTCLASS_JOB, id, log_buffer);
16+
17+      req_reject(PBSE_BADHOST, 0, request, NULL, "request not authorized");
18+
19+      close_client(sfds);
20+
21+      return;
22+      }
23+
24     if (!tfind(svr_conn[sfds].cn_addr, &okclients))
25       {
26       sprintf(log_buffer, "request type %s from host %s rejected (host not authorized)",
Note: See TracBrowser for help on using the repository browser.