Logo Search packages:      
Sourcecode: condor version File versions  Download package

int DaemonCore::Verify ( char const *  command_descrip,
DCpermission  perm,
const struct sockaddr_in *  sin,
const char *  fqu 
)

Not_Yet_Documented

Parameters:
perm Not_Yet_Documented
sin Not_Yet_Documented
Returns:
Not_Yet_Documented

Definition at line 2470 of file daemon_core.cpp.

References getSecMan(), and MyString::Value().

{
      MyString deny_reason; // always get 'deny' reason, if there is one
      MyString *allow_reason = NULL;
      MyString allow_reason_buf;
      if( (DebugFlags & D_SECURITY) ) {
                  // only get 'allow' reason if doing verbose debugging
            allow_reason = &allow_reason_buf;
      }

      int result = getSecMan()->Verify(perm, sin, fqu, allow_reason, &deny_reason);

      MyString *reason = result ? allow_reason : &deny_reason;
      char const *result_desc = result ? "GRANTED" : "DENIED";

      if( reason ) {
            char ipstr[IP_STRING_BUF_SIZE];
            sin_to_ipstring(sin,ipstr,IP_STRING_BUF_SIZE);

                  // Note that although this says D_ALWAYS, when the result is
                  // ALLOW, we only get here if D_SECURITY is on.
            dprintf( D_ALWAYS,
                         "PERMISSION %s to %s from host %s for %s, "
                         "access level %s: reason: %s\n",
                         result_desc,
                         (fqu && *fqu) ? fqu : "unauthenticated user",
                         ipstr,
                         command_descrip ? command_descrip : "unspecified operation",
                         PermString(perm),
                         reason->Value() );
      }

      return result;
}


Generated by  Doxygen 1.6.0   Back to index