aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2020-05-17 20:21:59 -0700
committerRuss Allbery <eagle@eyrie.org>2020-05-17 20:21:59 -0700
commit108233784827d54361c99c67eaee9e668010b3c3 (patch)
tree329ad2e791fb27ecc037259c16b922be03e977d0 /client
parent201ac5003d4fba8b15dbb64628782970bd3422fd (diff)
Reformat all C code with clang-format-10
Diffstat (limited to 'client')
-rw-r--r--client/internal.h6
-rw-r--r--client/keytab.c3
-rw-r--r--client/krb5.c4
-rw-r--r--client/options.c2
-rw-r--r--client/srvtab.c8
-rw-r--r--client/wallet-rekey.c8
-rw-r--r--client/wallet.c2
7 files changed, 16 insertions, 17 deletions
diff --git a/client/internal.h b/client/internal.h
index 1aed874..2a97ded 100644
--- a/client/internal.h
+++ b/client/internal.h
@@ -12,8 +12,8 @@
#ifndef CLIENT_INTERNAL_H
#define CLIENT_INTERNAL_H 1
-#include <portable/macros.h>
#include <portable/krb5.h>
+#include <portable/macros.h>
#include <sys/types.h>
@@ -22,10 +22,10 @@
* people don't want to use krb5.conf for some reason.
*/
#ifndef WALLET_SERVER
-# define WALLET_SERVER NULL
+# define WALLET_SERVER NULL
#endif
#ifndef WALLET_PORT
-# define WALLET_PORT 0
+# define WALLET_PORT 0
#endif
/* Forward declarations to avoid unnecessary includes. */
diff --git a/client/keytab.c b/client/keytab.c
index ed1bdb9..5bceec5 100644
--- a/client/keytab.c
+++ b/client/keytab.c
@@ -248,8 +248,7 @@ rekey_keytab(struct remctl *r, krb5_context ctx, const char *type,
} else {
merge_keytab(ctx, tempfile, file);
if (unlink(tempfile) < 0)
- syswarn("unlink of temporary keytab file %s failed",
- tempfile);
+ syswarn("unlink of temporary keytab file %s failed", tempfile);
}
}
diff --git a/client/krb5.c b/client/krb5.c
index f0c0ff1..42e20ea 100644
--- a/client/krb5.c
+++ b/client/krb5.c
@@ -47,8 +47,8 @@ kinit(krb5_context ctx, const char *principal)
krb5_get_init_creds_opt_set_default_flags(ctx, "wallet", princ->realm,
opts);
memset(&creds, 0, sizeof(creds));
- status = krb5_get_init_creds_password(ctx, &creds, princ, NULL,
- krb5_prompter_posix, NULL, 0, NULL, opts);
+ status = krb5_get_init_creds_password(
+ ctx, &creds, princ, NULL, krb5_prompter_posix, NULL, 0, NULL, opts);
if (status != 0)
die_krb5(ctx, status, "authentication failed");
diff --git a/client/options.c b/client/options.c
index 7b1f04e..1a85196 100644
--- a/client/options.c
+++ b/client/options.c
@@ -124,7 +124,7 @@ default_options(krb5_context ctx, struct options *options)
/* Having no local realm may be intentional, so don't report an error. */
krb5_get_default_realm(ctx, &realm);
-
+
/* Load the options. */
default_string(ctx, realm, "wallet_type", "wallet", &options->type);
default_string(ctx, realm, "wallet_server", WALLET_SERVER,
diff --git a/client/srvtab.c b/client/srvtab.c
index 5fd39dc..30fb69b 100644
--- a/client/srvtab.c
+++ b/client/srvtab.c
@@ -18,9 +18,9 @@
#include <util/messages.h>
#ifndef KRB5_KRB4_COMPAT
-# define ANAME_SZ 40
-# define INST_SZ 40
-# define REALM_SZ 40
+# define ANAME_SZ 40
+# define INST_SZ 40
+# define REALM_SZ 40
#endif
/*
@@ -51,7 +51,7 @@ write_srvtab(krb5_context ctx, const char *srvtab, const char *principal,
krb5_error_code ret;
size_t length;
char aname[ANAME_SZ + 1] = "";
- char inst[INST_SZ + 1] = "";
+ char inst[INST_SZ + 1] = "";
char realm[REALM_SZ + 1] = "";
char data[ANAME_SZ + 1 + INST_SZ + 1 + REALM_SZ + 1 + 1 + 8];
diff --git a/client/wallet-rekey.c b/client/wallet-rekey.c
index 2aedf57..13e25a8 100644
--- a/client/wallet-rekey.c
+++ b/client/wallet-rekey.c
@@ -3,7 +3,7 @@
*
* Written by Russ Allbery <eagle@eyrie.org>
* and Jon Robertson <jonrober@stanford.edu>
- * Copyright 2018 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2018, 2020 Russ Allbery <eagle@eyrie.org>
* Copyright 2010
* The Board of Trustees of the Leland Stanford Junior University
*
@@ -14,12 +14,12 @@
#include <portable/krb5.h>
#include <portable/system.h>
-#include <remctl.h>
#include <errno.h>
+#include <remctl.h>
#include <client/internal.h>
-#include <util/messages.h>
#include <util/messages-krb5.h>
+#include <util/messages.h>
/*
* Usage message. Use as a format and pass the port number and default server
@@ -41,7 +41,7 @@ Options:\n\
/*
* Display the usage message for wallet-rekey.
*/
-static void __attribute__((__noreturn__))
+__attribute__((__noreturn__)) static void
usage(int status)
{
fprintf((status == 0) ? stdout : stderr, usage_message, WALLET_PORT,
diff --git a/client/wallet.c b/client/wallet.c
index 435f000..cb4ba3d 100644
--- a/client/wallet.c
+++ b/client/wallet.c
@@ -46,7 +46,7 @@ Options:\n\
/*
* Display the usage message for wallet.
*/
-static void __attribute__((__noreturn__))
+__attribute__((__noreturn__)) static void
usage(int status)
{
fprintf((status == 0) ? stdout : stderr, usage_message, WALLET_PORT,