Allow rd_priv/rd_safe without remote address
[krb5.git] / src / lib / krb5 / krb / rd_priv.c
index 831f25807577c13ae4afdbaf0dccfb97c3fb5cc4..93259680e83c0995652f951a58d640da2d649466 100644 (file)
@@ -133,7 +133,8 @@ krb5_rd_priv(krb5_context context, krb5_auth_context auth_context,
         /* Need a better error */
         return KRB5_RC_REQUIRED;
 
-    if (!auth_context->remote_addr)
+    if ((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_TIME) &&
+        (auth_context->remote_addr == NULL))
         return KRB5_REMOTE_ADDR_REQUIRED;
 
     if ((auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_TIME) &&