--- src/lib/Libattr/attr_fn_acl.c 2012-06-19 13:00:44.997916094 +0100 +++ src/lib/Libattr/attr_fn_acl.c.new 2012-06-19 13:00:17.670873898 +0100 @@ -92,6 +92,12 @@ #include "list_link.h" #include "attribute.h" #include "pbs_error.h" +#include "log.h" +#if SYSLOG +#include +#endif + +extern int LOGLEVEL; /* * This file contains general functions for attributes of type @@ -1007,11 +1013,11 @@ const char *master) { - const char *pchost; - const char *pmhost; - const char *pcuser; - const char *pmuser; - const char *ptr; + char *pchost; + char *pmhost; + char pcuser[1024]; + char pmuser[1024]; + char *ptr; if ((can == NULL) || (!strcmp(can, "LOCAL"))) { @@ -1019,7 +1025,8 @@ } /* separate the user and the host portions */ - ptr = strchr(can, '@'); + strcpy(pcuser, can); + ptr = strchr(pcuser, '@'); if(ptr == NULL) { /* we are expecting the format @. No @ was found */ @@ -1036,11 +1043,11 @@ /* set pcuser to can and then null terminate user by setting ptr to 0 */ - pcuser = can; - ptr = NULL; + *ptr = 0; /* next separate the user and host for the master */ - ptr = strchr(master, '@'); + strcpy(pmuser, master); + ptr = strchr(pmuser, '@'); if(ptr == NULL) { /* we are expecting the format @. No @ was found */ @@ -1055,8 +1062,20 @@ return(1); } - pmuser = master; - ptr = NULL; + *ptr = 0; + + if (LOGLEVEL >= 3) + { + sprintf(log_buffer, "user: %s, host %s || user %s, host %s", pcuser, pchost, pmuser, pmhost); + + log_record( + PBSEVENT_SCHED, + PBS_EVENTCLASS_REQUEST, + "acl", + log_buffer); + } + + if(match_strings(pcuser, pmuser)) {