change isset to isflagset
authorJohn Kohl <jtkohl@mit.edu>
Wed, 7 Feb 1990 17:44:53 +0000 (17:44 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Wed, 7 Feb 1990 17:44:53 +0000 (17:44 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@308 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/policy.c

index bb5e563a18ae99f40753d4fc9a4f3ced0f80e546..6bd7f1822da60322997141bad36c6955ac614b66 100644 (file)
@@ -35,12 +35,12 @@ krb5_boolean
 against_flag_policy_as(request)
 register krb5_as_req *request;
 {
-    if (isset(request->kdc_options, KDC_OPT_FORWARDED) ||
-       isset(request->kdc_options, KDC_OPT_PROXY) ||
-       isset(request->kdc_options, KDC_OPT_RENEW) ||
-       isset(request->kdc_options, KDC_OPT_VALIDATE) ||
-       isset(request->kdc_options, KDC_OPT_REUSE_SKEY) ||
-       isset(request->kdc_options, KDC_OPT_ENC_TKT_IN_SKEY))
+    if (isflagset(request->kdc_options, KDC_OPT_FORWARDED) ||
+       isflagset(request->kdc_options, KDC_OPT_PROXY) ||
+       isflagset(request->kdc_options, KDC_OPT_RENEW) ||
+       isflagset(request->kdc_options, KDC_OPT_VALIDATE) ||
+       isflagset(request->kdc_options, KDC_OPT_REUSE_SKEY) ||
+       isflagset(request->kdc_options, KDC_OPT_ENC_TKT_IN_SKEY))
        return TRUE;                    /* against policy */
 
     return FALSE;                      /* not against policy */
@@ -50,31 +50,33 @@ krb5_boolean
 against_flag_policy_tgs(request)
 register krb5_tgs_req *request;
 {
-    if (((isset(request->kdc_options, KDC_OPT_FORWARDED) ||
-         isset(request->kdc_options, KDC_OPT_FORWARDABLE)) &&
-        !isset(request->header->ticket->enc_part2->flags,
+    register krb5_real_tgs_req *realreq = request->tgs_request2;
+
+    if (((isflagset(realreq->kdc_options, KDC_OPT_FORWARDED) ||
+         isflagset(realreq->kdc_options, KDC_OPT_FORWARDABLE)) &&
+        !isflagset(request->header2->ticket->enc_part2->flags,
                TKT_FLG_FORWARDABLE)) || /* TGS must be forwardable to get
                                            forwarded or forwardable ticket */
 
-       ((isset(request->kdc_options, KDC_OPT_PROXY) ||
-         isset(request->kdc_options, KDC_OPT_PROXIABLE)) &&
-        !isset(request->header->ticket->enc_part2->flags,
+       ((isflagset(realreq->kdc_options, KDC_OPT_PROXY) ||
+         isflagset(realreq->kdc_options, KDC_OPT_PROXIABLE)) &&
+        !isflagset(request->header2->ticket->enc_part2->flags,
                TKT_FLG_PROXIABLE)) ||  /* TGS must be proxiable to get
                                           proxiable ticket */
 
-       ((isset(request->kdc_options, KDC_OPT_ALLOW_POSTDATE) ||
-         isset(request->kdc_options, KDC_OPT_POSTDATED)) &&
-        !isset(request->header->ticket->enc_part2->flags,
+       ((isflagset(realreq->kdc_options, KDC_OPT_ALLOW_POSTDATE) ||
+         isflagset(realreq->kdc_options, KDC_OPT_POSTDATED)) &&
+        !isflagset(request->header2->ticket->enc_part2->flags,
                TKT_FLG_MAY_POSTDATE)) || /* TGS must allow postdating to get
                                           postdated ticket */
         
-       (isset(request->kdc_options, KDC_OPT_VALIDATE) &&
-        !isset(request->header->ticket->enc_part2->flags,
+       (isflagset(realreq->kdc_options, KDC_OPT_VALIDATE) &&
+        !isflagset(request->header2->ticket->enc_part2->flags,
                TKT_FLG_INVALID)) ||    /* can only validate invalid tix */
 
-       ((isset(request->kdc_options, KDC_OPT_RENEW) ||
-         isset(request->kdc_options, KDC_OPT_RENEWABLE)) &&
-        !isset(request->header->ticket->enc_part2->flags,
+       ((isflagset(realreq->kdc_options, KDC_OPT_RENEW) ||
+         isflagset(realreq->kdc_options, KDC_OPT_RENEWABLE)) &&
+        !isflagset(request->header2->ticket->enc_part2->flags,
                TKT_FLG_RENEWABLE)))    /* can only renew renewable tix */
 
        return TRUE;                    /* against policy */