Reindent per krb5-batch-reindent.el.
authorKen Raeburn <raeburn@mit.edu>
Sun, 4 Sep 2011 23:52:34 +0000 (23:52 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sun, 4 Sep 2011 23:52:34 +0000 (23:52 +0000)
Some minor reformatting added in places to avoid exceeding 80 columns.
Used Emacs 22.1 built-in C mode.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25144 dc483132-0cff-0310-8789-dd5450dbe970

56 files changed:
src/appl/gss-sample/gss-client.c
src/include/k5-int.h
src/kadmin/cli/kadmin.c
src/kadmin/server/ovsec_kadmd.c
src/kdc/kdc_preauth.c
src/kdc/kdc_util.c
src/kdc/kdc_util.h
src/lib/gssapi/generic/gssapi_generic.c
src/lib/gssapi/krb5/accept_sec_context.c
src/lib/gssapi/krb5/acquire_cred.c
src/lib/gssapi/krb5/gssapi_krb5.c
src/lib/gssapi/krb5/import_name.c
src/lib/gssapi/krb5/init_sec_context.c
src/lib/gssapi/krb5/prf.c
src/lib/gssapi/krb5/store_cred.c
src/lib/gssapi/mechglue/g_acquire_cred_with_pw.c
src/lib/gssapi/mechglue/g_mechattr.c
src/lib/kadm5/srv/pwqual_princ.c
src/lib/krb5/asn.1/asn1_k_decode_fast.c
src/lib/krb5/asn.1/asn1_k_decode_kdc.c
src/lib/krb5/asn.1/asn1_k_decode_macros.h
src/lib/krb5/asn.1/asn1_k_decode_sam.c
src/lib/krb5/asn.1/asn1_k_encode.c
src/lib/krb5/asn.1/krb5_decode_kdc.c
src/lib/krb5/asn.1/krb5_decode_macros.h
src/lib/krb5/krb/authdata.c
src/lib/krb5/krb/authdata_dec.c
src/lib/krb5/krb/copy_auth.c
src/lib/krb5/krb/fast.c
src/lib/krb5/krb/gic_opt.c
src/lib/krb5/krb/init_ctx.c
src/lib/krb5/krb/int-proto.h
src/lib/krb5/krb/rd_cred.c
src/lib/krb5/krb/s4u_authdata.c
src/lib/krb5/krb/s4u_creds.c
src/lib/krb5/krb/t_expire_warn.c
src/lib/krb5/krb/t_vfy_increds.c
src/lib/krb5/krb/val_renew.c
src/lib/krb5/os/locate_kdc.c
src/lib/krb5/os/trace.c
src/plugins/kdb/db2/kdb_db2.c
src/plugins/kdb/hdb/kdb_hdb.c
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
src/plugins/preauth/securid_sam2/securid2.c
src/plugins/preauth/securid_sam2/securid_sam2_main.c
src/slave/kprop_sock.c
src/tests/gssapi/t_imp_cred.c
src/tests/gssapi/t_spnego.c
src/tests/threads/init_ctx.c
src/tests/threads/profread.c
src/util/gss-kernel-lib/t_kgss_kernel.c
src/util/profile/profile_tcl.c
src/util/profile/test_vtable.c
src/util/profile/testmod/testmod_main.c
src/util/support/path.c
src/util/windows/getopt.c

index 79c01d6f3d7d9f9a5784c4c3197c250c7f061c77..d2eaab3faa280bf99f387297097bb9aa8270df38 100644 (file)
@@ -72,7 +72,7 @@
 static int verbose = 1;
 static int spnego = 0;
 static gss_OID_desc gss_spnego_mechanism_oid_desc =
-        {6, (void *)"\x2b\x06\x01\x05\x05\x02"};
+{6, (void *)"\x2b\x06\x01\x05\x05\x02"};
 
 static void
 usage()
index 17a0abe45425111dd0e097998a1c65ab20c529c7..c153a7e51b617a1994ccbad0c4a7df12466f8888 100644 (file)
@@ -372,9 +372,9 @@ typedef INT64_TYPE krb5_int64;
 #define KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED 80 /* bad digest algorithm in SignedData */
 #define KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED 81
 #define KRB_AP_ERR_IAKERB_KDC_NOT_FOUND         85 /* The IAKERB proxy could
-not find a KDC */
+                                                      not find a KDC */
 #define KRB_AP_ERR_IAKERB_KDC_NO_RESPONSE       86 /* The KDC did not respond
-to the IAKERB proxy */
+                                                      to the IAKERB proxy */
 
 /*
  * This structure is returned in the e-data field of the KRB-ERROR
index 5240c2ff91e50e95b3f3a7a5bfaeda5288b216a7..baaac0bab356c3a243723b6ba2ef968c1cc88dfd 100644 (file)
@@ -1136,12 +1136,13 @@ kadmin_addprinc_usage()
 {
     fprintf(stderr, _("usage: add_principal [options] principal\n"));
     fprintf(stderr, _("\toptions are:\n"));
-    fprintf(stderr, _("\t\t[-x db_princ_args]* [-expire expdate] "
-            "[-pwexpire pwexpdate] [-maxlife maxtixlife]\n"
-            "\t\t[-kvno kvno] [-policy policy] [-clearpolicy] [-randkey]\n"
-            "\t\t[-pw password] [-maxrenewlife maxrenewlife]\n"
-                      "\t\t[-e keysaltlist]\n\t\t[{+|-}attribute]\n")
-    );
+    fprintf(stderr,
+            _("\t\t[-x db_princ_args]* [-expire expdate] "
+              "[-pwexpire pwexpdate] [-maxlife maxtixlife]\n"
+              "\t\t[-kvno kvno] [-policy policy] [-clearpolicy] [-randkey]\n"
+              "\t\t[-pw password] [-maxrenewlife maxrenewlife]\n"
+              "\t\t[-e keysaltlist]\n\t\t[{+|-}attribute]\n")
+        );
     fprintf(stderr, _("\tattributes are:\n"));
     fprintf(stderr,
             _("\t\tallow_postdated allow_forwardable allow_tgs_req "
index 2800f877881eaa352096e76fb5db0c0465f06969..fac5ccd2491822d72089819e15be15786f97ba26 100644 (file)
@@ -363,7 +363,7 @@ int main(int argc, char *argv[])
                          _("%s: could not initialize loop, aborting"),
                          whoami);
         fprintf(stderr, _("%s: could not initialize loop, aborting\n"),
-                        whoami);
+                whoami);
         kadm5_destroy(global_server_handle);
         krb5_klog_close(context);
         exit(1);
@@ -373,12 +373,12 @@ int main(int argc, char *argv[])
     if ((ret = loop_add_udp_port(server_handle->params.kpasswd_port))
         || (ret = loop_add_tcp_port(server_handle->params.kpasswd_port))
         || (ret = loop_add_rpc_service(server_handle->params.kadmind_port,
-                                  KADM, KADMVERS, kadm_1))
+                                       KADM, KADMVERS, kadm_1))
 #ifndef DISABLE_IPROP
         || (server_handle->params.iprop_enabled
             ? (ret = loop_add_rpc_service(server_handle->params.iprop_port,
-                                     KRB5_IPROP_PROG, KRB5_IPROP_VERS,
-                                     krb5_iprop_prog_1))
+                                          KRB5_IPROP_PROG, KRB5_IPROP_VERS,
+                                          krb5_iprop_prog_1))
             : 0)
 #endif
 #undef server_handle
index d0a57b5fcbb5648f835f3d268aed7900cad1fad4..72c1752e918509384624e82c3d5711405be540da 100644 (file)
@@ -298,7 +298,7 @@ static preauth_system static_preauth_systems[] = {
 #endif
 };
 
-#define NUM_STATIC_PREAUTH_SYSTEMS (sizeof(static_preauth_systems) / \
+#define NUM_STATIC_PREAUTH_SYSTEMS (sizeof(static_preauth_systems) /    \
                                     sizeof(*static_preauth_systems))
 
 static preauth_system *preauth_systems;
index bfc48c5d0a476f6378900ef055f55c8d2f864c98..e18fb2c860e9e78eaaba2af598b5fcd07f1ff145 100644 (file)
@@ -2457,7 +2457,7 @@ kdc_handle_protected_negotiation(krb5_data *req_pkt, krb5_kdc_req *request,
     krb5_data *out = NULL;
     krb5_pa_data pa, *pa_in;
     pa_in = krb5int_find_pa_data(kdc_context, request->padata,
-                              KRB5_ENCPADATA_REQ_ENC_PA_REP);
+                                 KRB5_ENCPADATA_REQ_ENC_PA_REP);
     if (pa_in == NULL)
         return 0;
     pa.magic = KV5M_PA_DATA;
index 20e8ac46dd0fcad2b92e62d0140a4b3488a40608..e2790e23dd6fb37a2bea0ee91c0e6cb2d24b7bb7 100644 (file)
@@ -144,7 +144,7 @@ kdc_err(krb5_context call_context, errcode_t code, const char *fmt, ...)
 #if !defined(__cplusplus) && (__GNUC__ > 2)
     __attribute__((__format__(__printf__, 3, 4)))
 #endif
-;
+    ;
 
 /* policy.c */
 int
index 3ef2c0c8ee76165ab637d519cb22182878270e5e..dd254cf979242d636c93110c1214833bf63f4139 100644 (file)
@@ -371,11 +371,11 @@ static struct mech_attr_info_desc {
 
 OM_uint32
 generic_gss_display_mech_attr(
-      OM_uint32         *minor_status,
-      gss_const_OID      mech_attr,
-      gss_buffer_t       name,
-      gss_buffer_t       short_desc,
-      gss_buffer_t       long_desc)
+    OM_uint32         *minor_status,
+    gss_const_OID      mech_attr,
+    gss_buffer_t       name,
+    gss_buffer_t       short_desc,
+    gss_buffer_t       long_desc)
 {
     size_t i;
 
index 3d4158163af67789fa01c606bf47be28263e205d..a41968ed8d60403407df1813f8e940341f3d1505 100644 (file)
@@ -1374,4 +1374,3 @@ krb5_gss_accept_sec_context(minor_status, context_handle,
                                            delegated_cred_handle,
                                            &exts);
 }
-
index e71420881e84da8d8eb599a3dbc758d4085c1a10..b95a5397eedf4e429e858441ed6d1227e52b33b4 100644 (file)
@@ -875,4 +875,3 @@ gss_krb5int_import_cred(OM_uint32 *minor_status,
         k5_mutex_destroy(&name.lock);
     return code;
 }
-
index 8dccc60d08c62c18d6274fa6bee86326f75785f2..4d4f545f5cad5a0ce71f930869a65e88502fe71f 100644 (file)
@@ -647,8 +647,8 @@ krb5_gss_inquire_mech_for_saslname(OM_uint32 *minor_status,
             *mech_type = (gss_OID)gss_mech_krb5;
         return GSS_S_COMPLETE;
     } else if (sasl_mech_name->length == GS2_IAKERB_SASL_NAME_LEN &&
-        memcmp(sasl_mech_name->value,
-               GS2_IAKERB_SASL_NAME, GS2_IAKERB_SASL_NAME_LEN) == 0) {
+               memcmp(sasl_mech_name->value,
+                      GS2_IAKERB_SASL_NAME, GS2_IAKERB_SASL_NAME_LEN) == 0) {
         if (mech_type != NULL)
             *mech_type = (gss_OID)gss_mech_iakerb;
         return GSS_S_COMPLETE;
@@ -668,7 +668,8 @@ krb5_gss_inquire_saslname_for_mech(OM_uint32 *minor_status,
         if (!g_make_string_buffer(GS2_IAKERB_SASL_NAME, sasl_mech_name) ||
             !g_make_string_buffer("iakerb", mech_name) ||
             !g_make_string_buffer("Initial and Pass Through Authentication "
-                             "Kerberos Mechanism (IAKERB)", mech_description))
+                                  "Kerberos Mechanism (IAKERB)",
+                                  mech_description))
             goto fail;
     } else {
         if (!g_make_string_buffer(GS2_KRB5_SASL_NAME, sasl_mech_name) ||
@@ -703,10 +704,11 @@ krb5_gss_inquire_attrs_for_mech(OM_uint32 *minor_status,
     if (GSS_ERROR(major))
         goto cleanup;
 
-#define MA_SUPPORTED(ma)    do { \
-    major = gss_add_oid_set_member(minor_status, (gss_OID)ma, mech_attrs);  \
-    if (GSS_ERROR(major))                                                   \
-        goto cleanup;                                                       \
+#define MA_SUPPORTED(ma)    do {                                        \
+        major = gss_add_oid_set_member(minor_status, (gss_OID)ma,       \
+                                       mech_attrs);                     \
+        if (GSS_ERROR(major))                                           \
+            goto cleanup;                                               \
     } while (0)
 
     MA_SUPPORTED(GSS_C_MA_MECH_CONCRETE);
index 7583be72d27ba85445102b3c50bdbceb86be7033..0e730f98e2ff6154c843c69e6cc176c862822def 100644 (file)
@@ -219,7 +219,7 @@ krb5_gss_import_name(minor_status, input_name_buffer,
             goto do_getpwuid;
 #endif
         } else if (g_OID_equal(input_name_type, gss_nt_exported_name)) {
-#define BOUNDS_CHECK(cp, end, n) \
+#define BOUNDS_CHECK(cp, end, n)                                        \
             do { if ((end) - (cp) < (n)) goto fail_name; } while (0)
             cp = (unsigned char *)tmp;
             end = cp + input_name_buffer->length;
index ea00c22af16a47cfa4f0fbd3f65efd2235bd94c5..0133bf084b559a118ae81f88b0c0419fc7f1ef73 100644 (file)
@@ -1135,4 +1135,3 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle,
                                          time_rec,
                                          &exts);
 }
-
index 66cbe7078f0c3d6744efa9b001e1c749f7b9d59a..6fd34e954675e92f28b9c1aaa2549f52c4dcf1b1 100644 (file)
@@ -132,4 +132,3 @@ cleanup:
     *minor_status = (OM_uint32)code;
     return (code == 0) ? GSS_S_COMPLETE : GSS_S_FAILURE;
 }
-
index 94cfd432689c1b62b5079ab951b3ca4424cea1e4..5b4dfe8f7541e60ebd74b6ed1f6de15dcc5eb7c5 100644 (file)
@@ -182,4 +182,3 @@ krb5_gss_store_cred(OM_uint32 *minor_status,
 
     return GSS_S_COMPLETE;
 }
-
index 3030ee741194c5dbaced1b0816370a418d3d181f..92b30bafe9e505f2434728d43f46bf328e2834de 100644 (file)
@@ -177,7 +177,7 @@ OM_uint32 *         time_rec;
     /* for each requested mech attempt to obtain a credential */
     for (i = 0; i < mechs->count; i++) {
        major = gss_add_cred_with_password(minor_status, (gss_cred_id_t)creds,
-                            desired_name, 
+                            desired_name,
                             &mechs->elements[i],
                             password,
                             cred_usage, time_req, time_req, NULL,
index 663e02ad40c4855c97865d3ff43acfb6070bea16..64bb03bc39cc642ec81e46df3b7988047ac76543 100644 (file)
@@ -90,11 +90,11 @@ testMechAttrsKnown(gss_const_OID_set critical,
 
 OM_uint32 KRB5_CALLCONV
 gss_indicate_mechs_by_attrs(
-      OM_uint32         *minor,
-      gss_const_OID_set  desired_mech_attrs,
-      gss_const_OID_set  except_mech_attrs,
-      gss_const_OID_set  critical_mech_attrs,
-      gss_OID_set       *mechs)
+    OM_uint32         *minor,
+    gss_const_OID_set  desired_mech_attrs,
+    gss_const_OID_set  except_mech_attrs,
+    gss_const_OID_set  critical_mech_attrs,
+    gss_OID_set       *mechs)
 {
     OM_uint32       status, tmpMinor;
     gss_OID_set     allMechs = GSS_C_NO_OID_SET;
@@ -154,10 +154,10 @@ cleanup:
 
 OM_uint32 KRB5_CALLCONV
 gss_inquire_attrs_for_mech(
-      OM_uint32         *minor,
-      gss_const_OID      mech_oid,
-      gss_OID_set       *mech_attrs,
-      gss_OID_set       *known_mech_attrs)
+    OM_uint32         *minor,
+    gss_const_OID      mech_oid,
+    gss_OID_set       *mech_attrs,
+    gss_OID_set       *known_mech_attrs)
 {
     OM_uint32       status, tmpMinor;
     gss_mechanism   mech;
@@ -214,11 +214,11 @@ gss_inquire_attrs_for_mech(
 
 OM_uint32 KRB5_CALLCONV
 gss_display_mech_attr(
-      OM_uint32         *minor,
-      gss_const_OID      mech_attr,
-      gss_buffer_t       name,
-      gss_buffer_t       short_desc,
-      gss_buffer_t       long_desc)
+    OM_uint32         *minor,
+    gss_const_OID      mech_attr,
+    gss_buffer_t       name,
+    gss_buffer_t       short_desc,
+    gss_buffer_t       long_desc)
 {
     return generic_gss_display_mech_attr(minor, mech_attr,
                                          name, short_desc, long_desc);
index f733a393f91d67164183bae7b643546966860d1b..cbf2d72054aa0d80bf2a1201bd73497006d4bddb 100644 (file)
@@ -61,7 +61,7 @@ princ_check(krb5_context context, krb5_pwqual_moddata data,
 
 krb5_error_code
 pwqual_princ_initvt(krb5_context context, int maj_ver, int min_ver,
-                   krb5_plugin_vtable vtable)
+                    krb5_plugin_vtable vtable)
 {
     krb5_pwqual_vtable vt;
 
index 6d9ddd436db4df135552f0d4b49e6e1de8957844..57546ac93c650d5541855e087cdc52e881520df1 100644 (file)
@@ -76,4 +76,3 @@ asn1_decode_fast_finished_ptr(asn1buf *buf, krb5_fast_finished **valptr)
 {
     decode_ptr( krb5_fast_finished *, asn1_decode_fast_finished);
 }
-
index 52c371b9b94910ec6a7bb9b73346355dfb6d6e3c..1711ca04aef369bc32907a6e48b46b7591549ee5 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "asn1_k_decode_macros.h"
+
 asn1_error_code
 asn1_decode_kdc_req(asn1buf *buf, krb5_kdc_req *val)
 {
@@ -47,7 +47,7 @@ error_out:
     val->padata = NULL;
     return retval;
 }
-  
+
 asn1_error_code
 asn1_decode_kdc_req_body(asn1buf *buf, krb5_kdc_req *val)
 {
index de433c2da06b968b3fb16059c3a733c9e57b102f..e7c8a54ebc6bfcd668ba4095f47d8ed5f8e2b6d2 100644 (file)
 #define clean_return(val) { retval = val; goto error_out; }
 
 /* Declare useful decoder variables. */
-#define setup()                                                  \
-    asn1_error_code retval;                                      \
-    asn1_class asn1class;                                        \
-    asn1_construction construction KRB5_ATTR_UNUSED;             \
-    asn1_tagnum tagnum;                                          \
+#define setup()                                         \
+    asn1_error_code retval;                             \
+    asn1_class asn1class;                               \
+    asn1_construction construction KRB5_ATTR_UNUSED;    \
+    asn1_tagnum tagnum;                                 \
     unsigned int length, taglen KRB5_ATTR_UNUSED
 
 #define unused_var(x) if (0) { x = 0; x = x - x; }
index ae4e42f4bd37e699b6ccd8ff1e43cc91eb0ef9cc..70405eb2f7e1a6d49470f03ec7cde6dada57af18 100644 (file)
@@ -270,4 +270,3 @@ error_out:
     krb5_free_predicted_sam_response_contents(NULL, val);
     return retval;
 }
-
index 746b9128ca43fbfeff4ef2ca63237e45043c02cb..fffe9474c1d2520247ad37342d0b1f6e9ef80988 100644 (file)
@@ -1419,7 +1419,7 @@ static unsigned int iakerb_finished_optional(const void *p)
 }
 
 DEFSEQTYPE(iakerb_finished, krb5_iakerb_finished, iakerb_finished_fields,
-iakerb_finished_optional);
+           iakerb_finished_optional);
 
 /* Exported complete encoders -- these produce a krb5_data with
    the encoding in the correct byte order.  */
index 36380c2fbd56012ecbef6fcc4902a808d5e709e3..ac6ef20569d333aaec15be02898a743f10b9d51e 100644 (file)
@@ -95,7 +95,7 @@ decode_krb5_kdc_req_body(const krb5_data *code, krb5_kdc_req **repptr)
 
     cleanup(free);
 }
-  
+
 krb5_error_code
 decode_krb5_fast_req(const krb5_data *code, krb5_fast_req **repptr)
 {
@@ -167,4 +167,3 @@ decode_krb5_pa_pk_as_req_draft9(const krb5_data *code,
     cleanup(free);
 }
 #endif /* DISABLE_PKINIT */
-
index 16ae6fe2fe5c7faaf5b853f233e14d1ef915e0ab..aada1be628c255cf3d2016d5daee31764cef7907 100644 (file)
@@ -53,9 +53,9 @@
     retval = asn1buf_wrap_data(&buf,code);      \
     if (retval) return retval
 
-#define setup_no_tagnum(type)                                    \
-    asn1_class asn1class KRB5_ATTR_UNUSED;                       \
-    asn1_construction construction KRB5_ATTR_UNUSED;             \
+#define setup_no_tagnum(type)                           \
+    asn1_class asn1class KRB5_ATTR_UNUSED;              \
+    asn1_construction construction KRB5_ATTR_UNUSED;    \
     setup_buf_only(type)
 
 #define setup_no_length(type)                   \
index 351762eb1d801f20f4559a7486f6521fa7cf70df..a24143062f53db5706c4f0a8f09c54afbef70a3f 100644 (file)
@@ -1199,7 +1199,7 @@ krb5_ser_authdata_context_init(krb5_context kcontext)
 
 krb5_error_code
 krb5int_copy_authdatum(krb5_context context,
-               const krb5_authdata *inad, krb5_authdata **outad)
+                       const krb5_authdata *inad, krb5_authdata **outad)
 {
     krb5_authdata *tmpad;
 
index 5c9efbb166cadfd92cd5974be085f50593249988..9809b3376d9b4b9595d9512bfa63c6c9955b1123 100644 (file)
@@ -105,7 +105,7 @@ grow_find_authdata(krb5_context context, struct find_authdata_context *fctx,
     }
     fctx->out[fctx->length+1] = NULL;
     retval = krb5int_copy_authdatum(context, elem,
-                            &fctx->out[fctx->length]);
+                                    &fctx->out[fctx->length]);
     if (retval == 0)
         fctx->length++;
     return retval;
index a22d8cbb8d3ab8ed1b4c793d9c9ad58701076646..06a06450cdb2643f5e3cd9a5173d62a8ca131bd4 100644 (file)
@@ -86,7 +86,7 @@ krb5_merge_authdata(krb5_context context,
     if (inauthdat1) {
         for (nelems = 0; inauthdat1[nelems]; nelems++) {
             retval = krb5int_copy_authdatum(context, inauthdat1[nelems],
-                                    &tempauthdat[nelems]);
+                                            &tempauthdat[nelems]);
             if (retval) {
                 krb5_free_authdata(context, tempauthdat);
                 return retval;
@@ -97,7 +97,7 @@ krb5_merge_authdata(krb5_context context,
     if (inauthdat2) {
         for (nelems2 = 0; inauthdat2[nelems2]; nelems2++) {
             retval = krb5int_copy_authdatum(context, inauthdat2[nelems2],
-                                    &tempauthdat[nelems++]);
+                                            &tempauthdat[nelems++]);
             if (retval) {
                 krb5_free_authdata(context, tempauthdat);
                 return retval;
index 0d04cc2b025bf96f63d9255545bb9436f94469f9..2290d487407759af88251c2164463b91addd632c 100644 (file)
@@ -153,7 +153,7 @@ krb5int_fast_as_armor(krb5_context context,
                                  &ccache);
         if (retval == 0) {
             retval = krb5int_tgtname(context, target_realm, target_realm,
-                                  &target_principal);
+                                     &target_principal);
         }
         if (retval == 0) {
             krb5_data config_data;
index acb6f126dc9377c204d0bfdefc1068fdaaebb123..a98a47ed2aff279d94991c59d8dece5eb101697e 100644 (file)
@@ -228,8 +228,8 @@ krb5_get_init_creds_opt_free(krb5_context context,
 
 static krb5_error_code
 gic_opte_copy(krb5_context context,
-                      krb5_get_init_creds_opt *opt,
-                      krb5_gic_opt_ext **opte)
+              krb5_get_init_creds_opt *opt,
+              krb5_gic_opt_ext **opte)
 {
     krb5_gic_opt_ext *oe;
 
index 4896bef02478bdd9a567633e65f7e1800a1d729d..f244d566ebff43034ec62597a154c43bea29aeb3 100644 (file)
@@ -143,12 +143,12 @@ krb5_init_context_profile(profile_t profile, krb5_flags flags,
      * The context being NULL is ok.
      */
     krb5_win_ccdll_load(ctx);
-p
-    /*
-     * krb5_vercheck() is defined in win_glue.c, and this is
-     * where we handle the timebomb and version server checks.
-     */
-    retval = krb5_vercheck();
+    p
+        /*
+         * krb5_vercheck() is defined in win_glue.c, and this is
+         * where we handle the timebomb and version server checks.
+         */
+        retval = krb5_vercheck();
     if (retval)
         return retval;
 #endif
index 4a3cea80d91832c3d125b4b3ed18ad1e1264cff3..336c04571990a253e993136217eec3ab531f7a9f 100644 (file)
@@ -29,7 +29,7 @@
 
 krb5_error_code
 krb5int_tgtname(krb5_context context, const krb5_data *, const krb5_data *,
-             krb5_principal *);
+                krb5_principal *);
 
 krb5_error_code
 krb5int_libdefault_boolean(krb5_context, const krb5_data *, const char *,
index df9497b2df40484116561670150a131ba6cf24dd..22eb4ec7ce3551275427cdf41e71b5f3ade3e7dd 100644 (file)
@@ -208,15 +208,15 @@ krb5_rd_cred(krb5_context context, krb5_auth_context auth_context,
      * If decrypting with the subsession key fails, perhaps the
      * credentials are stored in the session key so try decrypting with that.
      */
-     if (auth_context->recv_subkey == NULL ||
-         (retval = krb5_rd_cred_basic(context, pcreddata,
-                                      auth_context->recv_subkey,
-                                      &replaydata, pppcreds))) {
-         retval = krb5_rd_cred_basic(context, pcreddata,
-                                     auth_context->key,
-                                     &replaydata, pppcreds);
-         if (retval)
-             return retval;
+    if (auth_context->recv_subkey == NULL ||
+        (retval = krb5_rd_cred_basic(context, pcreddata,
+                                     auth_context->recv_subkey,
+                                     &replaydata, pppcreds))) {
+        retval = krb5_rd_cred_basic(context, pcreddata,
+                                    auth_context->key,
+                                    &replaydata, pppcreds);
+        if (retval)
+            return retval;
     }
 
     if (auth_context->auth_context_flags & KRB5_AUTH_CONTEXT_DO_TIME) {
index 54713cc85496d7d77baa23842ba279e08eaeb9bf..d93e75816947cb23b7aac73235fa76b39e3546cd 100644 (file)
@@ -190,7 +190,7 @@ s4u2proxy_export_authdata(krb5_context kcontext,
 
     *out_authdata = authdata;
 
-    return 0; 
+    return 0;
 }
 
 static krb5_error_code
@@ -287,8 +287,8 @@ s4u2proxy_get_attribute(krb5_context kcontext,
                         const krb5_data *attribute,
                         krb5_boolean *authenticated,
                         krb5_boolean *complete,
-                        krb5_data *value, 
-                        krb5_data *display_value, 
+                        krb5_data *value,
+                        krb5_data *display_value,
                         int *more)
 {
     struct s4u2proxy_context *s4uctx = (struct s4u2proxy_context *)request_context;
@@ -423,7 +423,7 @@ s4u2proxy_size(krb5_context kcontext,
         if (code != 0)
             return code;
     }
-                            
+
     *sizep += sizeof(krb5_int32); /* authenticated flag */
 
     return code;
@@ -463,7 +463,7 @@ s4u2proxy_externalize(krb5_context kcontext,
         if (code != 0)
             return code;
     }
-    
+
     krb5_ser_pack_int32(s4uctx->authenticated, &bp, &remain); /* authenticated */
 
     *buffer = bp;
@@ -599,4 +599,3 @@ krb5plugin_authdata_client_ftable_v0 krb5int_s4u2proxy_authdata_client_ftable =
     s4u2proxy_internalize,
     s4u2proxy_copy
 };
-
index 57e8b92d4fbb95fe93341e9aa7fe6c5317047f2f..e4cc8a14be11b3cb309ddca2e2aa8a96a6af0c3f 100644 (file)
@@ -82,7 +82,7 @@ s4u_identify_user(krb5_context context,
 
         return krb5_copy_principal(context,
                                    anonymous ? in_creds->server
-                                             : in_creds->client,
+                                   : in_creds->client,
                                    canon_user);
     }
 
@@ -685,14 +685,14 @@ krb5_get_credentials_for_user(krb5_context context, krb5_flags options,
 
     if (in_creds->client != NULL &&
         in_creds->client->type == KRB5_NT_ENTERPRISE_PRINCIPAL) {
-       /* Post-canonicalisation check for enterprise principals */
-       krb5_creds mcreds = *in_creds;
-       mcreds.client = realm;
-       code = krb5_get_credentials(context, options | KRB5_GC_CACHED,
-                                   ccache, &mcreds, out_creds);
-       if ((code != KRB5_CC_NOTFOUND && code != KRB5_CC_NOT_KTYPE)
-           || (options & KRB5_GC_CACHED))
-           goto cleanup;
+        /* Post-canonicalisation check for enterprise principals */
+        krb5_creds mcreds = *in_creds;
+        mcreds.client = realm;
+        code = krb5_get_credentials(context, options | KRB5_GC_CACHED,
+                                    ccache, &mcreds, out_creds);
+        if ((code != KRB5_CC_NOTFOUND && code != KRB5_CC_NOT_KTYPE)
+            || (options & KRB5_GC_CACHED))
+            goto cleanup;
     }
 
     code = krb5_get_self_cred_from_kdc(context, options, ccache,
index c6ff8242e823dd4636a1ee386b3c3600142d12a6..1e59acba103e7753f0c264d7c8da7e617832e081 100644 (file)
@@ -30,7 +30,7 @@ static int exp_dummy, prompt_dummy;
 
 static krb5_error_code
 prompter_cb(krb5_context ctx, void *data, const char *name,
-           const char *banner, int num_prompts, krb5_prompt prompts[])
+            const char *banner, int num_prompts, krb5_prompt prompts[])
 {
     /* Not expecting any actual prompts, only banners. */
     assert(num_prompts == 0);
@@ -41,7 +41,7 @@ prompter_cb(krb5_context ctx, void *data, const char *name,
 
 static void
 expire_cb(krb5_context ctx, void *data, krb5_timestamp password_expiration,
-         krb5_timestamp account_expiration, krb5_boolean is_last_req)
+          krb5_timestamp account_expiration, krb5_boolean is_last_req)
 {
     printf("password_expiration = %ld\n", (long)password_expiration);
     printf("account_expiration = %ld\n", (long)account_expiration);
@@ -59,26 +59,26 @@ main(int argc, char **argv)
     krb5_creds creds;
 
     if (argc < 4) {
-       fprintf(stderr, "Usage: %s username password {1|0} [service]\n",
-               argv[0]);
-       return 1;
+        fprintf(stderr, "Usage: %s username password {1|0} [service]\n",
+                argv[0]);
+        return 1;
     }
     user = argv[1];
     password = argv[2];
     use_cb = atoi(argv[3]);
     if (argc >= 5)
-       service = argv[4];
+        service = argv[4];
 
     assert(krb5_init_context(&ctx) == 0);
     assert(krb5_get_init_creds_opt_alloc(ctx, &opt) == 0);
     if (use_cb) {
-       assert(krb5_get_init_creds_opt_set_expire_callback(ctx, opt, expire_cb,
-                                                          &exp_dummy) == 0);
+        assert(krb5_get_init_creds_opt_set_expire_callback(ctx, opt, expire_cb,
+                                                           &exp_dummy) == 0);
     }
     assert(krb5_parse_name(ctx, user, &client) == 0);
     assert(krb5_get_init_creds_password(ctx, &creds, client, password,
-                                       prompter_cb, &prompt_dummy, 0, service,
-                                       opt) == 0);
+                                        prompter_cb, &prompt_dummy, 0, service,
+                                        opt) == 0);
     krb5_get_init_creds_opt_free(ctx, opt);
     krb5_free_principal(ctx, client);
     krb5_free_cred_contents(ctx, &creds);
index 4fb2498f2091fea7f8b78ec1f29109793ade98f2..e5d68777a04d8d75c316fab029bd5ccb07d8b107 100644 (file)
@@ -51,6 +51,6 @@ main(int argc, char **argv)
     assert(krb5_cc_close(context, ccache) == 0);
 
     if (krb5_verify_init_creds(context, &creds, NULL, NULL, NULL, NULL) != 0)
-       return 1;
+        return 1;
     return 0;
 }
index ef37bdfed60f10021a7d899a8b0c0028c6aee4cb..39912aaa88d9055ceb717fe9c836ecf8bdc6bdf0 100644 (file)
@@ -46,7 +46,7 @@
  */
 static krb5_error_code
 get_new_creds(krb5_context context, krb5_ccache ccache, krb5_creds *in_creds,
-             krb5_flags kdcopt, krb5_creds **out_creds)
+              krb5_flags kdcopt, krb5_creds **out_creds)
 {
     krb5_error_code code;
     krb5_creds old_creds, *new_creds = NULL;
@@ -55,19 +55,19 @@ get_new_creds(krb5_context context, krb5_ccache ccache, krb5_creds *in_creds,
 
     /* Retrieve an existing cached credential matching in_creds. */
     code = krb5_cc_retrieve_cred(context, ccache, KRB5_TC_SUPPORTED_KTYPES,
-                                in_creds, &old_creds);
+                                 in_creds, &old_creds);
     if (code != 0)
-       return code;
+        return code;
 
     /* Use KDC options from old credential as well as requested options. */
     kdcopt |= (old_creds.ticket_flags & KDC_TKT_COMMON_MASK);
 
     /* Use the old credential to get a new credential from the KDC. */
     code = krb5_get_cred_via_tkt(context, &old_creds, kdcopt,
-                                old_creds.addresses, in_creds, &new_creds);
+                                 old_creds.addresses, in_creds, &new_creds);
     krb5_free_cred_contents(context, &old_creds);
     if (code != 0)
-       return code;
+        return code;
 
     *out_creds = new_creds;
     return code;
@@ -80,7 +80,7 @@ get_new_creds(krb5_context context, krb5_ccache ccache, krb5_creds *in_creds,
  */
 static krb5_error_code
 gc_valrenew(krb5_context context, krb5_ccache ccache, krb5_creds *in_creds,
-           krb5_flags kdcopt, krb5_creds **out_creds)
+            krb5_flags kdcopt, krb5_creds **out_creds)
 {
     krb5_error_code code;
     krb5_creds *new_creds = NULL;
@@ -89,7 +89,7 @@ gc_valrenew(krb5_context context, krb5_ccache ccache, krb5_creds *in_creds,
     /* Get the validated or renewed credential. */
     code = get_new_creds(context, ccache, in_creds, kdcopt, &new_creds);
     if (code != 0)
-       goto cleanup;
+        goto cleanup;
 
     /* Reinitialize the cache without changing its default principal. */
     code = krb5_cc_get_principal(context, ccache, &default_princ);
@@ -102,7 +102,7 @@ gc_valrenew(krb5_context context, krb5_ccache ccache, krb5_creds *in_creds,
     /* Store the validated or renewed cred in the now-empty cache. */
     code = krb5_cc_store_cred(context, ccache, new_creds);
     if (code != 0)
-       goto cleanup;
+        goto cleanup;
 
     *out_creds = new_creds;
     new_creds = NULL;
@@ -135,29 +135,29 @@ krb5_get_credentials_renew(krb5_context context, krb5_flags options,
  */
 static krb5_error_code
 get_valrenewed_creds(krb5_context context, krb5_creds *out_creds,
-                    krb5_principal client, krb5_ccache ccache,
-                    char *in_tkt_service, int kdcopt)
+                     krb5_principal client, krb5_ccache ccache,
+                     char *in_tkt_service, int kdcopt)
 {
     krb5_error_code code;
     krb5_creds in_creds, *new_creds;
     krb5_principal server = NULL;
 
     if (in_tkt_service != NULL) {
-       /* Parse in_tkt_service, but use the client's realm. */
-       code = krb5_parse_name(context, in_tkt_service, &server);
-       if (code != 0)
-           goto cleanup;
-       krb5_free_data_contents(context, &server->realm);
-       code = krb5int_copy_data_contents(context, &client->realm,
-                                         &server->realm);
-       if (code != 0)
-           goto cleanup;
+        /* Parse in_tkt_service, but use the client's realm. */
+        code = krb5_parse_name(context, in_tkt_service, &server);
+        if (code != 0)
+            goto cleanup;
+        krb5_free_data_contents(context, &server->realm);
+        code = krb5int_copy_data_contents(context, &client->realm,
+                                          &server->realm);
+        if (code != 0)
+            goto cleanup;
     } else {
-       /* Use the TGT name for the client's realm. */
-       code = krb5int_tgtname(context, &client->realm, &client->realm,
-                              &server);
-       if (code != 0)
-           goto cleanup;
+        /* Use the TGT name for the client's realm. */
+        code = krb5int_tgtname(context, &client->realm, &client->realm,
+                               &server);
+        if (code != 0)
+            goto cleanup;
     }
 
     memset(&in_creds, 0, sizeof(krb5_creds));
@@ -167,7 +167,7 @@ get_valrenewed_creds(krb5_context context, krb5_creds *out_creds,
     /* Get the validated or renewed credential from the KDC. */
     code = get_new_creds(context, ccache, &in_creds, kdcopt, &new_creds);
     if (code != 0)
-       goto cleanup;
+        goto cleanup;
 
     /* Fill in *out_creds and free the unwanted new_creds container. */
     *out_creds = *new_creds;
@@ -180,18 +180,18 @@ cleanup:
 
 krb5_error_code KRB5_CALLCONV
 krb5_get_validated_creds(krb5_context context, krb5_creds *creds,
-                        krb5_principal client, krb5_ccache ccache,
-                        char *in_tkt_service)
+                         krb5_principal client, krb5_ccache ccache,
+                         char *in_tkt_service)
 {
     return get_valrenewed_creds(context, creds, client, ccache,
-                               in_tkt_service, KDC_OPT_VALIDATE);
+                                in_tkt_service, KDC_OPT_VALIDATE);
 }
 
 krb5_error_code KRB5_CALLCONV
 krb5_get_renewed_creds(krb5_context context, krb5_creds *creds,
-                      krb5_principal client, krb5_ccache ccache,
-                      char *in_tkt_service)
+                       krb5_principal client, krb5_ccache ccache,
+                       char *in_tkt_service)
 {
     return get_valrenewed_creds(context, creds, client, ccache,
-                               in_tkt_service, KDC_OPT_RENEW);
+                                in_tkt_service, KDC_OPT_RENEW);
 }
index 8bcfb267825f541d04334dd87acc0d6d6a436857..acfce8c87ab0f95ca6579130351a3e45264191a3 100644 (file)
@@ -186,8 +186,8 @@ add_host_to_list(struct serverlist *list, const char *hostname, int port,
 
 static krb5_error_code
 locate_srv_conf_1(krb5_context context, const krb5_data *realm,
-                       const char * name, struct serverlist *serverlist,
-                       int socktype, int udpport, int sec_udpport)
+                  const char * name, struct serverlist *serverlist,
+                  int socktype, int udpport, int sec_udpport)
 {
     const char  *realm_srv_names[4];
     char **hostlist, *host, *port, *cp;
index 83df52eb7fd4dfa9b4b581b3813045c0708679b2..a31b0059fb8576290796d97bcf328912542b69c2 100644 (file)
@@ -8,7 +8,7 @@
  *   require a specific license from the United States Government.
  *   It is the responsibility of any person or organization contemplating
  *   export to obtain such a license before exporting.
- * 
+ *
  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
  * distribute this software and its documentation for any purpose and
  * without fee is hereby granted, provided that the above copyright
index c7756f595002e6d7d21914828708433d8ad5b237..f24b6575d83da10ee7acd3e75ea4882d02d68d33 100644 (file)
@@ -684,7 +684,7 @@ ctx_create_db(krb5_context context, krb5_db2_context *dbc)
         return retval;
 
     dbc->db_lf_file = open(dbc->db_lf_name, O_CREAT | O_RDWR | O_TRUNC,
-                              0600);
+                           0600);
     if (dbc->db_lf_file < 0) {
         retval = errno;
         goto cleanup;
index 31c67ebc0bf3f2e49fd29886ab4e5e190d22761b..a001ee3163df3ed336e7380e58b5e8afe3b28208 100644 (file)
@@ -1088,7 +1088,7 @@ kh_dbekd_decrypt_key_data(krb5_context context,
 
     if (mkey->enctype != ENCTYPE_UNKNOWN)
         code = krb5_dbe_def_decrypt_key_data(context, mkey, key_data,
-                                               kkey, keysalt);
+                                             kkey, keysalt);
     else
         code = kh_decrypt_key(context, kh, key_data, kkey, keysalt);
 
index 51c0ee1d0ca0f1930d5fb8bd78da4d96ddfaac8b..2f2446ab7f71313b27b99f79f8f1ec1b54aeecaf 100644 (file)
@@ -69,7 +69,7 @@
 #define CMS_get1_crls(_p7) (_p7->d.sign->crl)
 #define CMS_get1_certs(_p7) (_p7->d.sign->cert)
 #define CMS_ContentInfo_free(_p7) PKCS7_free(_p7)
-#define pkinit_CMS_SignerInfo_get_cert(_p7,_si,_x509_pp) \
+#define pkinit_CMS_SignerInfo_get_cert(_p7,_si,_x509_pp)        \
     (*_x509_pp) = PKCS7_cert_from_signer_info(_p7,_si)
 #endif
 
index be6a32b4a285f5aa4f8cc8f21c52ea0ed9ccf9a9..816946eeb376bf850b30f0429bac6e2b6ca29e2d 100644 (file)
@@ -363,11 +363,11 @@ verify_securid_data_2(krb5_context context, krb5_db_entry *client,
 
     if ((sr2->sam_enc_nonce_or_sad.ciphertext.data == NULL) ||
         (sr2->sam_enc_nonce_or_sad.ciphertext.length <= 0)) {
-          retval = KRB5KDC_ERR_PREAUTH_FAILED;
-          krb5_set_error_message(context, retval,
-                                 "No preauth data supplied in "
-                                 "verify_securid_data_2 (%s)", user);
-          goto cleanup;
+        retval = KRB5KDC_ERR_PREAUTH_FAILED;
+        krb5_set_error_message(context, retval,
+                               "No preauth data supplied in "
+                               "verify_securid_data_2 (%s)", user);
+        goto cleanup;
     }
 
     retval = krb5_dbe_find_enctype(context, client,
@@ -463,7 +463,7 @@ verify_securid_data_2(krb5_context context, krb5_db_entry *client,
             com_err("krb5kdc", retval,
                     "while decrypting SecurID trackID in "
                     "verify_securid_data_2 (%s)", user);
-           goto cleanup;
+            goto cleanup;
         }
         if (track_id_data.length < sizeof (struct securid_track_data)) {
             retval = KRB5KDC_ERR_PREAUTH_FAILED;
@@ -682,11 +682,11 @@ verify_securid_data_2(krb5_context context, krb5_db_entry *client,
             retval = securid_encrypt_track_data_2(context, client, &tmp_data,
                                                   &sc2b.sam_track_id);
             if (retval) {
-                   com_err("krb5kdc", retval,
-                           "while encrypting SecurID track "
-                           "data for SAM_CHALLENGE_2 (%s)",
-                           securid_user);
-                   goto cleanup;
+                com_err("krb5kdc", retval,
+                        "while encrypting SecurID track "
+                        "data for SAM_CHALLENGE_2 (%s)",
+                        securid_user);
+                goto cleanup;
             }
             retval = securid_make_sam_challenge_2_and_cksum(context, sc2p,
                                                             &sc2b,
index 6bc65e85eef15f125bab7a7d77b1592bbebd594c..0c420d22638d9863e34f636b2824339cd87201d8 100644 (file)
@@ -61,7 +61,7 @@ sam_get_db_entry(krb5_context context, krb5_principal client,
     krb5_error_code retval;
 
     if (db_entry)
-       *db_entry = NULL;
+        *db_entry = NULL;
     retval = krb5_copy_principal(context, client, &newp);
     if (retval) {
         com_err("krb5kdc", retval, "copying client name for preauth probe");
@@ -71,45 +71,45 @@ sam_get_db_entry(krb5_context context, krb5_principal client,
     probeslot = krb5_princ_size(context, newp)++;
     ptr = realloc(krb5_princ_name(context, newp),
                   krb5_princ_size(context, newp) * sizeof(krb5_data));
-   if (ptr == NULL) {
-       retval = ENOMEM;
-       goto cleanup;
-   }
-   krb5_princ_name(context, newp) = ptr;
+    if (ptr == NULL) {
+        retval = ENOMEM;
+        goto cleanup;
+    }
+    krb5_princ_name(context, newp) = ptr;
 
-   for(sam_ptr = sam_inst_map; sam_ptr->name; sam_ptr++) {
-       if (*sam_type && *sam_type != sam_ptr->sam_type)
-           continue;
+    for(sam_ptr = sam_inst_map; sam_ptr->name; sam_ptr++) {
+        if (*sam_type && *sam_type != sam_ptr->sam_type)
+            continue;
 
-       krb5_princ_component(context,newp,probeslot)->data = sam_ptr->name;
-       krb5_princ_component(context,newp,probeslot)->length =
-           strlen(sam_ptr->name);
-       retval = krb5_db_get_principal(context, newp, 0, &assoc);
-       if (!retval)
-           break;
-   }
+        krb5_princ_component(context,newp,probeslot)->data = sam_ptr->name;
+        krb5_princ_component(context,newp,probeslot)->length =
+            strlen(sam_ptr->name);
+        retval = krb5_db_get_principal(context, newp, 0, &assoc);
+        if (!retval)
+            break;
+    }
 cleanup:
-   if (ptr) {
-       krb5_princ_component(context,newp,probeslot)->data = 0;
-       krb5_princ_component(context,newp,probeslot)->length = 0;
-       krb5_free_principal(context, newp);
-   }
-   if (probeslot)
-       krb5_princ_size(context, newp)--;
-   if (retval)
-       return retval;
-   if (sam_ptr->sam_type)  {
-       /* Found entry of type sam_ptr->sam_type */
-       if (sam_type)
-           *sam_type = sam_ptr->sam_type;
-       if (db_entry)
-           *db_entry = assoc;
-       else
-           krb5_db_free_principal(context, assoc);
-       return 0;
-   } else {
-       return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
-   }
+    if (ptr) {
+        krb5_princ_component(context,newp,probeslot)->data = 0;
+        krb5_princ_component(context,newp,probeslot)->length = 0;
+        krb5_free_principal(context, newp);
+    }
+    if (probeslot)
+        krb5_princ_size(context, newp)--;
+    if (retval)
+        return retval;
+    if (sam_ptr->sam_type)  {
+        /* Found entry of type sam_ptr->sam_type */
+        if (sam_type)
+            *sam_type = sam_ptr->sam_type;
+        if (db_entry)
+            *db_entry = assoc;
+        else
+            krb5_db_free_principal(context, assoc);
+        return 0;
+    } else {
+        return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
+    }
 }
 
 static krb5_error_code
@@ -247,14 +247,16 @@ kdc_verify_preauth(krb5_context context, struct _krb5_db_entry_new *client,
         break;
     }
 
-  /*
-   * It is up to the method-specific verify routine to set the ticket flags to
-   * indicate TKT_FLG_HW_AUTH and/or TKT_FLG_PRE_AUTH.  Some methods may
-   * require more than one round of dialog with the client and must return
-   * successfully from their verify routine.  If does not set the TGT flags,
-   * the required_preauth conditions will not be met and it will try again to
-   * get enough preauth data from the client.  Do not set TGT flags here.
-   */
+    /*
+     * It is up to the method-specific verify routine to set the
+     * ticket flags to indicate TKT_FLG_HW_AUTH and/or
+     * TKT_FLG_PRE_AUTH.  Some methods may require more than one round
+     * of dialog with the client and must return successfully from
+     * their verify routine.  If does not set the TGT flags, the
+     * required_preauth conditions will not be met and it will try
+     * again to get enough preauth data from the client.  Do not set
+     * TGT flags here.
+     */
 cleanup:
     /*
      * Note that e_data is an output even in error conditions.  If we
index abd53af5d65553ca95c0b2acd6dfa704b038ac0e..a439b378cfbb2104b75fb05f89f8422756595b98 100644 (file)
  */
 krb5_error_code
 sockaddr2krbaddr(krb5_context context, int family, struct sockaddr *sa,
-                krb5_address **dest)
+                 krb5_address **dest)
 {
     krb5_address addr;
 
     addr.magic = KV5M_ADDRESS;
     if (family == AF_INET) {
-       struct sockaddr_in *sa4 = (struct sockaddr_in *) sa;
-       addr.addrtype = ADDRTYPE_INET;
-       addr.length = sizeof(sa4->sin_addr);
-       addr.contents = (krb5_octet *) &sa4->sin_addr;
+        struct sockaddr_in *sa4 = (struct sockaddr_in *) sa;
+        addr.addrtype = ADDRTYPE_INET;
+        addr.length = sizeof(sa4->sin_addr);
+        addr.contents = (krb5_octet *) &sa4->sin_addr;
     } else if (family == AF_INET6) {
-       struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *) sa;
+        struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *) sa;
         if (IN6_IS_ADDR_V4MAPPED(&sa6->sin6_addr)) {
             addr.addrtype = ADDRTYPE_INET;
             addr.contents = (krb5_octet *) &sa6->sin6_addr + 12;
             addr.length = 4;
         } else {
-           addr.addrtype = ADDRTYPE_INET6;
-           addr.length = sizeof(sa6->sin6_addr);
-           addr.contents = (krb5_octet *) &sa6->sin6_addr;
-       }
+            addr.addrtype = ADDRTYPE_INET6;
+            addr.length = sizeof(sa6->sin6_addr);
+            addr.contents = (krb5_octet *) &sa6->sin6_addr;
+        }
     } else
-       return KRB5_PROG_ATYPE_NOSUPP;
+        return KRB5_PROG_ATYPE_NOSUPP;
 
     return krb5_copy_addr(context, &addr, dest);
 }
index 063fd9ff6ee13cf40ed413b4511951a8339ecf95..f15a274f9e77728c136773d1a7e84c5b93c97621 100644 (file)
@@ -113,17 +113,17 @@ main(int argc, char *argv[])
     /* Acquire the krb5 objects we need. */
     ret = krb5_init_context(&context);
     if (ret)
-       exit_kerr(NULL, "krb5_init_context", ret);
+        exit_kerr(NULL, "krb5_init_context", ret);
     ret = krb5_cc_default(context, &cc);
     if (ret)
-       exit_kerr(context, "krb5_cc_default", ret);
+        exit_kerr(context, "krb5_cc_default", ret);
     ret = krb5_kt_default(context, &kt);
     if (ret)
-       exit_kerr(context, "krb5_kt_default", ret);
+        exit_kerr(context, "krb5_kt_default", ret);
     if (argc >= 3) {
-       ret = krb5_parse_name(context, argv[2], &princ);
-       if (ret)
-           exit_kerr(context, "krb5_parse_name", ret);
+        ret = krb5_parse_name(context, argv[2], &princ);
+        if (ret)
+            exit_kerr(context, "krb5_parse_name", ret);
     }
 
     /* Get initiator cred. */
index 91690b78645355c2634555fbee0554ee046a9259..54ab14739654c4eec6a78ad2a4e55405a51d21f9 100644 (file)
@@ -122,7 +122,7 @@ displayOID(OM_uint32 *minor, gss_OID oid, char *tag)
 
 static OM_uint32
 initAcceptSecContext(OM_uint32 *minor,
-                    gss_name_t target_name,
+                     gss_name_t target_name,
                      gss_cred_id_t verifier_cred_handle)
 {
     OM_uint32 major;
index 92c0ef6f1e4afb3c1789d92dc671ea00d140aeb5..7a59a1dd4e40293aa6e774a1963baf9d0cd3f3fa 100644 (file)
@@ -165,12 +165,12 @@ static void run_iterations (struct resource_info *r)
 
     r->start_time = now ();
     for (i = 0; i < iter_count; i++) {
-       err = krb5_init_context(&ctx);
-       if (err) {
-           com_err(prog, err, "initializing krb5 context");
-           exit(1);
-       }
-       krb5_free_context(ctx);
+        err = krb5_init_context(&ctx);
+        if (err) {
+            com_err(prog, err, "initializing krb5 context");
+            exit(1);
+        }
+        krb5_free_context(ctx);
     }
     r->end_time = now ();
 }
index a9ce3d6b2be8f5992607dc6f9bbafc2c5c3c2107..3909f236e5cfb23c8a259a2944f5c0878020de54 100644 (file)
@@ -168,22 +168,22 @@ static void run_iterations (struct resource_info *r)
 
     err = krb5_init_context(&ctx);
     if (err) {
-       com_err(prog, err, "initializing krb5 context");
-       exit(1);
+        com_err(prog, err, "initializing krb5 context");
+        exit(1);
     }
     err = krb5_get_profile(ctx, &prof);
     if (err) {
-       com_err(prog, err, "fetching profile from context");
-       exit(1);
+        com_err(prog, err, "fetching profile from context");
+        exit(1);
     }
     r->start_time = now ();
     for (i = 0; i < iter_count; i++) {
-       int ival;
-       err = profile_get_integer(prof, "one", "two", "three", 42, &ival);
-       if (err) {
-           com_err(prog, err, "fetching value from profile");
-           exit(1);
-       }
+        int ival;
+        err = profile_get_integer(prof, "one", "two", "three", 42, &ival);
+        if (err) {
+            com_err(prog, err, "fetching value from profile");
+            exit(1);
+        }
     }
     r->end_time = now ();
     profile_release (prof);
index b529620d9f1215d3d6065371cb0e29b30f27b927..890a7d949e5bfa5d47344badda59155a557b14ec 100644 (file)
@@ -44,7 +44,7 @@ check(OM_uint32 major, OM_uint32 minor, const char *fn)
     if (!GSS_ERROR(major))
         return;
     fprintf(stderr, "t_kgss_kernel: %s: major %u, minor %u\n", fn, major,
-           minor);
+            minor);
     /* libkgss doesn't have gss_display_status. */
     exit(1);
 }
@@ -175,7 +175,7 @@ send_wrap_token(gss_ctx_id_t ctx)
     buf.value = "kernelwrap";
     buf.length = 10;
     major = krb5_gss_wrap(&minor, ctx, 1, GSS_C_QOP_DEFAULT, &buf, NULL,
-                         &wrapped);
+                          &wrapped);
     check(major, minor, "krb5_gss_wrap");
     send_data(STDOUT_FILENO, wrapped.value, wrapped.length);
     free(wrapped.value);
index 613124a0a97834e5a53d9daade691b30a2cc4fc4..505fb801f5bc92c76bd8bb06a5108c0c36bdf9f3 100644 (file)
@@ -3363,4 +3363,3 @@ SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
 
   return TCL_OK;
 }
-
index 6370f2788a77fbb8947501c2e1c636828cff7fc2..9a0b2278a71e542f97f25ac55d1cc499b349e521 100644 (file)
@@ -60,7 +60,7 @@ free_values(void *cbdata, char **values)
     char **v;
 
     for (v = values; *v; v++)
-       free(*v);
+        free(*v);
     free(values);
 }
 
@@ -70,14 +70,14 @@ full_get_values(void *cbdata, const char *const *names, char ***ret_values)
     assert(cbdata == &full_cbdata);
     *ret_values = calloc(2, sizeof(*ret_values));
     if (names[0] == name_string)
-       (*ret_values)[0] = strdup("string result");
+        (*ret_values)[0] = strdup("string result");
     else if (names[0] == name_int)
-       (*ret_values)[0] = strdup("23");
+        (*ret_values)[0] = strdup("23");
     else if (names[0] == name_bool)
-       (*ret_values)[0] = strdup("on");
+        (*ret_values)[0] = strdup("on");
     else {
-       free(*ret_values);
-       return PROF_NO_RELATION;
+        free(*ret_values);
+        return PROF_NO_RELATION;
     }
     (*ret_values)[1] = NULL;
     return 0;
@@ -103,7 +103,7 @@ struct iterator {
 
 static long
 full_iterator_create(void *cbdata, const char *const *names, int flags,
-                    void **ret_iter)
+                     void **ret_iter)
 {
     struct iterator *iter;
 
@@ -124,14 +124,14 @@ full_iterator(void *cbdata, void *iter_arg, char **ret_name, char **ret_value)
     assert(cbdata == &full_cbdata);
     assert(iter->count >= 0 && iter->count <= 2);
     if (iter->count == 0) {
-       *ret_name = strdup("name1");
-       *ret_value = strdup("value1");
+        *ret_name = strdup("name1");
+        *ret_value = strdup("value1");
     } else if (iter->count == 1) {
-       *ret_name = strdup("name2");
-       *ret_value = NULL;
+        *ret_name = strdup("name2");
+        *ret_value = NULL;
     } else {
-       *ret_name = NULL;
-       *ret_value = NULL;
+        *ret_name = NULL;
+        *ret_value = NULL;
     }
     iter->count++;
     return 0;
@@ -141,7 +141,7 @@ static void
 full_iterator_free(void *cbdata, void *iter_arg)
 {
     struct iterator *iter = iter_arg;
-    
+
     assert(cbdata == &full_cbdata);
     assert(iter->count == 3);
     free(iter);
@@ -172,7 +172,7 @@ full_modified(void *cbdata, int *modified)
 
 static long
 full_update_relation(void *cbdata, const char **names,
-                    const char *old_value, const char *new_value)
+                     const char *old_value, const char *new_value)
 {
     assert(cbdata == &full_cbdata);
     assert(names == empty_names);
@@ -246,13 +246,13 @@ int main()
     assert(values[2] == NULL);
     profile_free_list(values);
     assert(profile_iterator_create(profile, NULL, 0, &iter) ==
-          PROF_UNSUPPORTED);
+           PROF_UNSUPPORTED);
     assert(profile_is_writable(profile, &intval) == 0);
     assert(intval == 0);
     assert(profile_is_modified(profile, &intval) == 0);
     assert(intval == 0);
     assert(profile_update_relation(profile, NULL, NULL, NULL) ==
-          PROF_UNSUPPORTED);
+           PROF_UNSUPPORTED);
     assert(profile_clear_relation(profile, NULL) == PROF_UNSUPPORTED);
     assert(profile_rename_section(profile, NULL, NULL) == PROF_UNSUPPORTED);
     assert(profile_add_relation(profile, NULL, NULL) == PROF_UNSUPPORTED);
@@ -261,14 +261,14 @@ int main()
 
     assert(profile_init_vtable(&full_vtable, &full_cbdata, &profile) == 0);
     assert(profile_get_string(profile, name_string, NULL, NULL, "wrong",
-                             &str) == 0);
+                              &str) == 0);
     assert(strcmp(str, "string result") == 0);
     profile_release_string(str);
     assert(profile_get_integer(profile, name_int, NULL, NULL, 24,
-                              &intval) == 0);
+                               &intval) == 0);
     assert(intval == 23);
     assert(profile_get_boolean(profile, name_bool, NULL, NULL, 0,
-                              &intval) == 0);
+                               &intval) == 0);
     assert(intval == 1);
     assert(profile_get_integer(profile, "xxx", NULL, NULL, 62, &intval) == 0);
     assert(intval == 62);
@@ -293,7 +293,7 @@ int main()
     assert(profile_is_modified(profile, &intval) == 0);
     assert(intval == 6);
     assert(profile_update_relation(profile, empty_names, name_string,
-                                  NULL) == 0);
+                                   NULL) == 0);
     assert(profile_clear_relation(profile, empty_names) == 0);
     assert(profile_rename_section(profile, empty_names, name_int) == 0);
     assert(profile_add_relation(profile, empty_names, name_bool) == 0);
index c58ac0487403c16f3de716400d7395de445b2ee4..126b199dca3dea606e88192d27f3079d5e2c63a5 100644 (file)
@@ -56,7 +56,7 @@ free_values(void *cbdata, char **values)
     char **v;
 
     for (v = values; *v; v++)
-       free(*v);
+        free(*v);
     free(values);
 }
 
@@ -83,11 +83,11 @@ copy(void *cbdata, void **ret_cbdata)
 
 long
 profile_module_init(const char *residual, struct profile_vtable *vtable,
-                   void **cb_ret);
+                    void **cb_ret);
 
 long
 profile_module_init(const char *residual, struct profile_vtable *vtable,
-                   void **cb_ret)
+                    void **cb_ret)
 {
     struct data *d;
 
index 221fb4a6a19dc9c87862398187dfea394d5b4d15..7a051abc9e124d9f45ebbf073145ed45b8fb6625 100644 (file)
@@ -54,9 +54,9 @@ find_sep(const char *path)
     slash = strrchr(path, '/');
     backslash = strrchr(path, '\\');
     if (slash != NULL && backslash != NULL)
-       return (slash > backslash) ? slash : backslash;
+        return (slash > backslash) ? slash : backslash;
     else
-       return (slash != NULL) ? slash : backslash;
+        return (slash != NULL) ? slash : backslash;
 #else
     return strrchr(path, '/');
 #endif
@@ -70,50 +70,50 @@ k5_path_split(const char *path, char **parent_out, char **basename_out)
     char *parent = NULL, *basename = NULL;
 
     if (parent_out != NULL)
-       *parent_out = NULL;
+        *parent_out = NULL;
     if (basename_out != NULL)
-       *basename_out = NULL;
+        *basename_out = NULL;
 
     pathstart = path;
 #ifdef WINDOWS_PATHS
     if (*path != '\0' && path[1] == ':')
-       pathstart = path + 2;
+        pathstart = path + 2;
 #endif
 
     sep = find_sep(pathstart);
     if (sep != NULL) {
-       bstart = sep + 1;
-       /* Strip off excess separators before the one we found. */
-       pend = sep;
-       while (pend > pathstart && IS_SEPARATOR(pend[-1]))
-           pend--;
-       /* But if we hit the start, keep the whole separator sequence. */
-       if (pend == pathstart)
-           pend = sep + 1;
+        bstart = sep + 1;
+        /* Strip off excess separators before the one we found. */
+        pend = sep;
+        while (pend > pathstart && IS_SEPARATOR(pend[-1]))
+            pend--;
+        /* But if we hit the start, keep the whole separator sequence. */
+        if (pend == pathstart)
+            pend = sep + 1;
     } else {
-       bstart = pathstart;
-       pend = pathstart;
+        bstart = pathstart;
+        pend = pathstart;
     }
 
     if (parent_out) {
-       parent = malloc(pend - path + 1);
-       if (parent == NULL)
-           return ENOMEM;
-       memcpy(parent, path, pend - path);
-       parent[pend - path] = '\0';
+        parent = malloc(pend - path + 1);
+        if (parent == NULL)
+            return ENOMEM;
+        memcpy(parent, path, pend - path);
+        parent[pend - path] = '\0';
     }
     if (basename_out) {
-       basename = strdup(bstart);
-       if (basename == NULL) {
-           free(parent);
-           return ENOMEM;
-       }
+        basename = strdup(bstart);
+        if (basename == NULL) {
+            free(parent);
+            return ENOMEM;
+        }
     }
 
     if (parent_out)
-       *parent_out = parent;
+        *parent_out = parent;
     if (basename_out)
-       *basename_out = basename;
+        *basename_out = basename;
     return 0;
 }
 
@@ -125,24 +125,24 @@ k5_path_join(const char *path1, const char *path2, char **path_out)
 
     *path_out = NULL;
     if (k5_path_isabs(path2) || *path1 == '\0') {
-       /* Discard path1 and return a copy of path2. */
-       path = strdup(path2);
-       if (path == NULL)
-           return ENOMEM;
+        /* Discard path1 and return a copy of path2. */
+        path = strdup(path2);
+        if (path == NULL)
+            return ENOMEM;
     } else {
-       /*
-        * Compose path1 and path2, adding a separator if path1 is non-empty
-        * there's no separator between them already.  (*path2 can be a
-        * separator in the weird case where it starts with /: or \: on
-        * Windows, and Python doesn't insert a separator in this case.)
-        */
-       c = path1[strlen(path1) - 1];
-       if (IS_SEPARATOR(c) || IS_SEPARATOR(*path2))
-           ret = asprintf(&path, "%s%s", path1, path2);
-       else
-           ret = asprintf(&path, "%s%c%s", path1, SEP, path2);
-       if (ret < 0)
-           return ENOMEM;
+        /*
+         * Compose path1 and path2, adding a separator if path1 is non-empty
+         * there's no separator between them already.  (*path2 can be a
+         * separator in the weird case where it starts with /: or \: on
+         * Windows, and Python doesn't insert a separator in this case.)
+         */
+        c = path1[strlen(path1) - 1];
+        if (IS_SEPARATOR(c) || IS_SEPARATOR(*path2))
+            ret = asprintf(&path, "%s%s", path1, path2);
+        else
+            ret = asprintf(&path, "%s%c%s", path1, SEP, path2);
+        if (ret < 0)
+            return ENOMEM;
     }
     *path_out = path;
     return 0;
@@ -153,7 +153,7 @@ k5_path_isabs(const char *path)
 {
 #ifdef WINDOWS_PATHS
     if (*path != '\0' && path[1] == ':')
-       path += 2;
+        path += 2;
     return (*path == '/' || *path == '\\');
 #else
     return (*path == '/');
index 3724a4ba5074db30fe16462b51922c2950fb3d36..4f9f0627ef13942dcdac1e39bad6042c435701c0 100644 (file)
@@ -144,7 +144,7 @@ getopt(nargc, nargv, ostr)
                                    __progname, optopt);
                        return (BADCH);
                }
-               else                            /* white space */
+               else                            /* white space */
                        optarg = nargv[optind];
                place = EMSG;
                ++optind;