summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFrançois Perrad <francois.perrad@gadz.org>2018-02-26 14:31:15 +0100
committerMatt Johnston <matt@ucc.asn.au>2018-02-26 21:31:15 +0800
commit2e836bb553d72d2546de80b7f4da35355efe5baf (patch)
tree0807ceaabc2f87b33d422acdcad73c45c4f80b10
parent36ccfd21e71ecbf7c5441194b8d38bfe1ffe61a6 (diff)
more linting (#58)
* const parameter * fix indentation
-rw-r--r--cli-session.c2
-rw-r--r--svr-auth.c4
-rw-r--r--svr-runopts.c2
-rw-r--r--svr-service.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/cli-session.c b/cli-session.c
index c28ed57..e0d3a75 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -181,7 +181,7 @@ static void cli_session_init(pid_t proxy_cmd_pid) {
}
-static void send_msg_service_request(char* servicename) {
+static void send_msg_service_request(const char* servicename) {
TRACE(("enter send_msg_service_request: servicename='%s'", servicename))
diff --git a/svr-auth.c b/svr-auth.c
index 90334e0..59d027e 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -38,7 +38,7 @@
#include "dbrandom.h"
static void authclear(void);
-static int checkusername(char *username, unsigned int userlen);
+static int checkusername(const char *username, unsigned int userlen);
/* initialise the first time for a session, resetting all parameters */
void svr_authinitialise() {
@@ -263,7 +263,7 @@ static int check_group_membership(gid_t check_gid, const char* username, gid_t u
/* Check that the username exists and isn't disallowed (root), and has a valid shell.
* returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */
-static int checkusername(char *username, unsigned int userlen) {
+static int checkusername(const char *username, unsigned int userlen) {
char* listshell = NULL;
char* usershell = NULL;
diff --git a/svr-runopts.c b/svr-runopts.c
index 1b057cf..99d63bb 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -542,7 +542,7 @@ void load_all_hostkeys() {
#if DROPBEAR_ECDSA
loadhostkey(ECDSA_PRIV_FILENAME, 0);
#endif
- }
+ }
#if DROPBEAR_DELAY_HOSTKEY
if (svr_opts.delay_hostkey) {
diff --git a/svr-service.c b/svr-service.c
index 1f72ea5..0aa487c 100644
--- a/svr-service.c
+++ b/svr-service.c
@@ -30,7 +30,7 @@
#include "ssh.h"
#include "auth.h"
-static void send_msg_service_accept(char *name, int len);
+static void send_msg_service_accept(const char *name, int len);
/* processes a SSH_MSG_SERVICE_REQUEST, returning 0 if finished,
* 1 if not */
@@ -73,7 +73,7 @@ void recv_msg_service_request() {
}
-static void send_msg_service_accept(char *name, int len) {
+static void send_msg_service_accept(const char *name, int len) {
TRACE(("accepting service %s", name))