svn rev #24434: users/lhoward/sasl-gs2/src/ appl/gss-sample/ lib/gssapi/generic/ ...
ghudson@MIT.EDU
ghudson at MIT.EDU
Wed Oct 6 14:10:02 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24434
Commit By: ghudson
Log Message:
Style police.
Changed Files:
U users/lhoward/sasl-gs2/src/appl/gss-sample/gss-client.c
U users/lhoward/sasl-gs2/src/appl/gss-sample/gss-server.c
U users/lhoward/sasl-gs2/src/lib/gssapi/generic/gssapi_generic.c
U users/lhoward/sasl-gs2/src/lib/gssapi/krb5/gssapi_krb5.c
U users/lhoward/sasl-gs2/src/lib/gssapi/mechglue/g_initialize.c
U users/lhoward/sasl-gs2/src/lib/gssapi/spnego/spnego_mech.c
U users/lhoward/sasl-gs2/src/tests/gssapi/t_saslname.c
Modified: users/lhoward/sasl-gs2/src/appl/gss-sample/gss-client.c
===================================================================
--- users/lhoward/sasl-gs2/src/appl/gss-sample/gss-client.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/appl/gss-sample/gss-client.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -76,8 +76,10 @@
static void
usage()
{
- fprintf(stderr, "Usage: gss-client [-port port] [-mech mechanism] [-spnego] [-d]\n");
- fprintf(stderr, " [-seq] [-noreplay] [-nomutual] [-user user] [-pass pw]");
+ fprintf(stderr, "Usage: gss-client [-port port] [-mech mechanism] "
+ "[-spnego] [-d]\n");
+ fprintf(stderr, " [-seq] [-noreplay] [-nomutual] [-user user] "
+ "[-pass pw]");
#ifdef _WIN32
fprintf(stderr, " [-threads num]");
#endif
@@ -288,7 +290,8 @@
do {
maj_stat = gss_init_sec_context(&init_sec_min_stat,
cred, gss_context,
- target_name, mechs.elements, gss_flags, 0,
+ target_name, mechs.elements,
+ gss_flags, 0,
NULL, /* channel bindings */
token_ptr, NULL, /* mech type */
&send_tok, ret_flags,
Modified: users/lhoward/sasl-gs2/src/appl/gss-sample/gss-server.c
===================================================================
--- users/lhoward/sasl-gs2/src/appl/gss-sample/gss-server.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/appl/gss-sample/gss-server.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -821,13 +821,8 @@
value.value = NULL;
display_value.value = NULL;
- major = gss_get_name_attribute(minor,
- name,
- attribute,
- &authenticated,
- &complete,
- &value,
- &display_value,
+ major = gss_get_name_attribute(minor, name, attribute, &authenticated,
+ &complete, &value, &display_value,
&more);
if (GSS_ERROR(major)) {
display_status("gss_get_name_attribute", major, *minor);
@@ -865,11 +860,7 @@
gss_buffer_set_t attrs = GSS_C_NO_BUFFER_SET;
unsigned int i;
- major = gss_inquire_name(minor,
- name,
- &name_is_MN,
- &mech,
- &attrs);
+ major = gss_inquire_name(minor, name, &name_is_MN, &mech, &attrs);
if (GSS_ERROR(major)) {
display_status("gss_inquire_name", major, *minor);
return major;
Modified: users/lhoward/sasl-gs2/src/lib/gssapi/generic/gssapi_generic.c
===================================================================
--- users/lhoward/sasl-gs2/src/lib/gssapi/generic/gssapi_generic.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/lib/gssapi/generic/gssapi_generic.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -210,8 +210,8 @@
GSS_DLLIMP gss_const_OID GSS_C_MA_COMPRESS = oids+33;
GSS_DLLIMP gss_const_OID GSS_C_MA_CTX_TRANS = oids+34;
-static gss_OID_set_desc gss_ma_known_attrs_desc = { 27, oids+8 };
-gss_OID_set gss_ma_known_attrs = &gss_ma_known_attrs_desc;
+static gss_OID_set_desc gss_ma_known_attrs_desc = { 27, oids+8 };
+gss_OID_set gss_ma_known_attrs = &gss_ma_known_attrs_desc;
#define STRING_BUFFER(x) { sizeof((x) - 1), (x) }
@@ -224,7 +224,8 @@
{
oids+8,
STRING_BUFFER("GSS_C_MA_MECH_CONCRETE"),
- STRING_BUFFER("Mechanism is neither a pseudo-mechanism nor a composite mechanism."),
+ STRING_BUFFER("Mechanism is neither a pseudo-mechanism nor a "
+ "composite mechanism."),
},
{
oids+9,
@@ -269,32 +270,38 @@
{
oids+17,
STRING_BUFFER("GSS_C_MA_AUTH_INIT"),
- STRING_BUFFER("Mechanism supports authentication of initiator to acceptor."),
+ STRING_BUFFER("Mechanism supports authentication of initiator to "
+ "acceptor."),
},
{
oids+18,
STRING_BUFFER("GSS_C_MA_AUTH_TARG"),
- STRING_BUFFER("Mechanism supports authentication of acceptor to initiator."),
+ STRING_BUFFER("Mechanism supports authentication of acceptor to "
+ "initiator."),
},
{
oids+19,
STRING_BUFFER("GSS_C_MA_AUTH_INIT_INIT"),
- STRING_BUFFER("Mechanism supports authentication of initiator using initial credentials."),
+ STRING_BUFFER("Mechanism supports authentication of initiator using "
+ "initial credentials."),
},
{
oids+20,
STRING_BUFFER("GSS_C_MA_AUTH_TARG_INIT"),
- STRING_BUFFER("Mechanism supports authentication of acceptor using initial credentials."),
+ STRING_BUFFER("Mechanism supports authentication of acceptor using "
+ "initial credentials."),
},
{
oids+21,
STRING_BUFFER("GSS_C_MA_AUTH_INIT_ANON"),
- STRING_BUFFER("Mechanism supports GSS_C_NT_ANONYMOUS as an initiator name."),
+ STRING_BUFFER("Mechanism supports GSS_C_NT_ANONYMOUS as an initiator "
+ "name."),
},
{
oids+22,
STRING_BUFFER("GSS_C_MA_AUTH_TARG_ANON"),
- STRING_BUFFER("Mechanism supports GSS_C_NT_ANONYMOUS as an acceptor name."),
+ STRING_BUFFER("Mechanism supports GSS_C_NT_ANONYMOUS as an acceptor "
+ "name."),
},
{
oids+23,
@@ -304,17 +311,19 @@
{
oids+24,
STRING_BUFFER("GSS_C_MA_INTEG_PROT"),
- STRING_BUFFER("Mechanism supports per-message integrity proteciton."),
+ STRING_BUFFER("Mechanism supports per-message integrity protection."),
},
{
oids+25,
STRING_BUFFER("GSS_C_MA_CONF_PROT"),
- STRING_BUFFER("Mechanism supports per-message confidentiality protection."),
+ STRING_BUFFER("Mechanism supports per-message confidentiality"
+ "protection."),
},
{
oids+26,
STRING_BUFFER("GSS_C_MA_MIC"),
- STRING_BUFFER("Mechanism supports Message Integrity Code (MIC) tokens."),
+ STRING_BUFFER("Mechanism supports Message Integrity Code (MIC) "
+ "tokens."),
},
{
oids+27,
@@ -324,7 +333,8 @@
{
oids+28,
STRING_BUFFER("GSS_C_MA_PROT_READY"),
- STRING_BUFFER("Mechanism supports per-message proteciton prior to full context establishment."),
+ STRING_BUFFER("Mechanism supports per-message proteciton prior to "
+ "full context establishment."),
},
{
oids+29,
@@ -349,7 +359,8 @@
{
oids+33,
STRING_BUFFER("GSS_C_MA_COMPRESS"),
- STRING_BUFFER("Mechanism supports compression of data inputs to gss_wrap()."),
+ STRING_BUFFER("Mechanism supports compression of data inputs to "
+ "gss_wrap()."),
},
{
oids+34,
@@ -358,7 +369,8 @@
},
};
-OM_uint32 generic_gss_display_mech_attr(
+OM_uint32
+generic_gss_display_mech_attr(
OM_uint32 *minor_status,
gss_const_OID mech_attr,
gss_buffer_t name,
@@ -389,7 +401,8 @@
return GSS_S_FAILURE;
}
if (short_desc != GSS_C_NO_BUFFER &&
- !g_make_string_buffer((char *)mai->short_desc.value, short_desc)) {
+ !g_make_string_buffer((char *)mai->short_desc.value,
+ short_desc)) {
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
Modified: users/lhoward/sasl-gs2/src/lib/gssapi/krb5/gssapi_krb5.c
===================================================================
--- users/lhoward/sasl-gs2/src/lib/gssapi/krb5/gssapi_krb5.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/lib/gssapi/krb5/gssapi_krb5.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -676,7 +676,8 @@
} else {
if (!g_make_string_buffer(GS2_KRB5_SASL_NAME, sasl_mech_name) ||
!g_make_string_buffer("krb5", mech_name) ||
- !g_make_string_buffer("Kerberos 5 GSS-API Mechanism", mech_description))
+ !g_make_string_buffer("Kerberos 5 GSS-API Mechanism",
+ mech_description))
goto fail;
}
Modified: users/lhoward/sasl-gs2/src/lib/gssapi/mechglue/g_initialize.c
===================================================================
--- users/lhoward/sasl-gs2/src/lib/gssapi/mechglue/g_initialize.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/lib/gssapi/mechglue/g_initialize.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -1237,4 +1237,3 @@
} /* while */
(void) fclose(confFile);
} /* loadConfigFile */
-
Modified: users/lhoward/sasl-gs2/src/lib/gssapi/spnego/spnego_mech.c
===================================================================
--- users/lhoward/sasl-gs2/src/lib/gssapi/spnego/spnego_mech.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/lib/gssapi/spnego/spnego_mech.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -2767,10 +2767,11 @@
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_NEGO);
Modified: users/lhoward/sasl-gs2/src/tests/gssapi/t_saslname.c
===================================================================
--- users/lhoward/sasl-gs2/src/tests/gssapi/t_saslname.c 2010-10-06 03:00:03 UTC (rev 24433)
+++ users/lhoward/sasl-gs2/src/tests/gssapi/t_saslname.c 2010-10-06 18:10:02 UTC (rev 24434)
@@ -31,10 +31,8 @@
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_ext.h>
-static void displayStatus_1(m, code, type)
- char *m;
- OM_uint32 code;
- int type;
+static void
+displayStatus_1(char *m, OM_uint32 code, int type)
{
OM_uint32 maj_stat, min_stat;
gss_buffer_desc msg;
@@ -53,10 +51,8 @@
}
}
-static void displayStatus(msg, maj_stat, min_stat)
- char *msg;
- OM_uint32 maj_stat;
- OM_uint32 min_stat;
+static void
+displayStatus(char *msg, OM_uint32 maj_stat, OM_unit32 min_stat)
{
displayStatus_1(msg, maj_stat, GSS_C_GSS_CODE);
displayStatus_1(msg, min_stat, GSS_C_MECH_CODE);
@@ -70,10 +66,7 @@
gss_OID_set known_attrs = GSS_C_NO_OID_SET;
size_t i;
- major = gss_inquire_attrs_for_mech(minor,
- mech,
- &mech_attrs,
- &known_attrs);
+ major = gss_inquire_attrs_for_mech(minor, mech, &mech_attrs, &known_attrs);
if (GSS_ERROR(major)) {
displayStatus("gss_inquire_attrs_for_mech", major, *minor);
return major;
@@ -156,19 +149,27 @@
continue;
}
- printf("------------------------------------------------------------------------------\n");
- printf("OID : %.*s\n", (int)oidstr.length, (char *)oidstr.value);
- printf("SASL mech : %.*s\n", (int)sasl_mech_name.length, (char *)sasl_mech_name.value);
- printf("Mech name : %.*s\n", (int)mech_name.length, (char *)mech_name.value);
- printf("Mech desc : %.*s\n", (int)mech_description.length, (char *)mech_description.value);
+ printf("-------------------------------------------------------------"
+ "-----------------\n");
+ printf("OID : %.*s\n", (int)oidstr.length,
+ (char *)oidstr.value);
+ printf("SASL mech : %.*s\n", (int)sasl_mech_name.length,
+ (char *)sasl_mech_name.value);
+ printf("Mech name : %.*s\n", (int)mech_name.length,
+ (char *)mech_name.value);
+ printf("Mech desc : %.*s\n", (int)mech_description.length,
+ (char *)mech_description.value);
dumpMechAttrs(&minor, &mechs->elements[i]);
- printf("------------------------------------------------------------------------------\n");
+ printf("-------------------------------------------------------------"
+ "-----------------\n");
- if (GSS_ERROR(gss_inquire_mech_for_saslname(&minor, &sasl_mech_name, &oid))) {
+ if (GSS_ERROR(gss_inquire_mech_for_saslname(&minor, &sasl_mech_name,
+ &oid))) {
displayStatus("gss_inquire_mech_for_saslname", major, minor);
} else if (oid == GSS_C_NO_OID ||
(oid->length != mechs->elements[i].length &&
- memcmp(oid->elements, mechs->elements[i].elements, oid->length) != 0)) {
+ memcmp(oid->elements, mechs->elements[i].elements,
+ oid->length) != 0)) {
gss_release_buffer(&minor, &oidstr);
(void) gss_oid_to_str(&minor, oid, &oidstr);
fprintf(stderr, "Got different OID %.*s for mechanism %.*s\n",
More information about the cvs-krb5
mailing list