summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/db/sysdb_ops.c1
-rw-r--r--server/external/libpcre.m42
-rw-r--r--server/responder/nss/nsssrv_cmd.c16
-rw-r--r--server/responder/pam/pamsrv_cmd.c4
-rw-r--r--server/responder/pam/pamsrv_util.c1
-rw-r--r--server/util/nss_sha512crypt.c24
6 files changed, 23 insertions, 25 deletions
diff --git a/server/db/sysdb_ops.c b/server/db/sysdb_ops.c
index 41e59a9a3..955e9ec70 100644
--- a/server/db/sysdb_ops.c
+++ b/server/db/sysdb_ops.c
@@ -792,7 +792,6 @@ int sysdb_check_name_unique(struct sysdb_req *sysreq,
static int check_name_callback(struct ldb_request *req, struct ldb_reply *rep)
{
struct sysdb_cb_ctx *cbctx;
- struct sysdb_ctx *ctx;
int err;
cbctx = talloc_get_type(req->context, struct sysdb_cb_ctx);
diff --git a/server/external/libpcre.m4 b/server/external/libpcre.m4
index ed744f36d..32cfbcf80 100644
--- a/server/external/libpcre.m4
+++ b/server/external/libpcre.m4
@@ -4,4 +4,4 @@ AC_SUBST(PCRE_LIBS)
AC_SUBST(PCRE_CFLAGS)
AC_CHECK_HEADERS(pcre.h)
-AC_CHECK_LIB(pcre, pcre_compile, [ PCRE_LIBS="-lpcre" ])
+AC_CHECK_LIB(pcre, pcre_compile, [ PCRE_LIBS="-lpcre" ], [AC_MSG_ERROR([PCRE is required])])
diff --git a/server/responder/nss/nsssrv_cmd.c b/server/responder/nss/nsssrv_cmd.c
index d090b9d18..367df36f5 100644
--- a/server/responder/nss/nsssrv_cmd.c
+++ b/server/responder/nss/nsssrv_cmd.c
@@ -192,7 +192,7 @@ static int fill_pwent(struct sss_packet *packet,
rp += 2*sizeof(uint32_t);
if (add_domain) {
- ret = snprintf(&body[rp], s1, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], s1, namefmt, name, domain);
if (ret >= s1) {
/* need more space, got creative with the print format ? */
t = ret - s1 + 1;
@@ -206,7 +206,7 @@ static int fill_pwent(struct sss_packet *packet,
sss_packet_get_body(packet, &body, &blen);
/* retry */
- ret = snprintf(&body[rp], s1, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], s1, namefmt, name, domain);
}
if (ret != s1-1) {
@@ -1375,7 +1375,7 @@ static int fill_grent(struct sss_packet *packet,
/* 8-X: sequence of strings (name, passwd, mem..) */
if (add_domain) {
- ret = snprintf(&body[rp], name_len, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], name_len, namefmt, name, domain);
if (ret >= name_len) {
/* need more space, got creative with the print format ? */
t = ret - name_len + 1;
@@ -1389,7 +1389,7 @@ static int fill_grent(struct sss_packet *packet,
sss_packet_get_body(packet, &body, &blen);
/* retry */
- ret = snprintf(&body[rp], name_len, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], name_len, namefmt, name, domain);
}
if (ret != name_len-1) {
@@ -1441,7 +1441,7 @@ static int fill_grent(struct sss_packet *packet,
rp = blen - rsize;
if (add_domain) {
- ret = snprintf(&body[rp], name_len, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], name_len, namefmt, name, domain);
if (ret >= name_len) {
/* need more space, got creative with the print format ? */
t = ret - name_len + 1;
@@ -1455,7 +1455,7 @@ static int fill_grent(struct sss_packet *packet,
sss_packet_get_body(packet, &body, &blen);
/* retry */
- ret = snprintf(&body[rp], name_len, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], name_len, namefmt, name, domain);
}
if (ret != name_len-1) {
@@ -1531,7 +1531,7 @@ static int fill_grent(struct sss_packet *packet,
rp = blen - rsize;
if (add_domain) {
- ret = snprintf(&body[rp], name_len, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], name_len, namefmt, name, domain);
if (ret >= name_len) {
/* need more space, got creative with the print format ? */
t = ret - name_len + 1;
@@ -1545,7 +1545,7 @@ static int fill_grent(struct sss_packet *packet,
sss_packet_get_body(packet, &body, &blen);
/* retry */
- ret = snprintf(&body[rp], name_len, namefmt, name, domain);
+ ret = snprintf((char *)&body[rp], name_len, namefmt, name, domain);
}
if (ret != name_len-1) {
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index 8f74e96f6..22a2b85de 100644
--- a/server/responder/pam/pamsrv_cmd.c
+++ b/server/responder/pam/pamsrv_cmd.c
@@ -3,6 +3,7 @@
#include "util/util.h"
#include "confdb/confdb.h"
+#include "responder/common/responder_packet.h"
#include "responder/pam/pam_LOCAL_domain.h"
#include "responder/pam/pamsrv.h"
@@ -22,7 +23,7 @@ static int pam_parse_in_data(struct sss_names_ctx *snctx,
for (start = end; end < last; end++) if (body[end] == '\0') break;
if (body[end++] != '\0') return EINVAL;
- ret = sss_parse_name(pd, snctx, &body[start], &pd->domain, &pd->user);
+ ret = sss_parse_name(pd, snctx, (char *)&body[start], &pd->domain, &pd->user);
if (ret != EOK) return ret;
for (start = end; end < last; end++) if (body[end] == '\0') break;
@@ -100,7 +101,6 @@ static void pam_reply_delay(struct tevent_context *ev, struct tevent_timer *te,
static void pam_reply(struct pam_data *pd)
{
struct cli_ctx *cctx;
- struct sss_cmd_ctx *rctx;
uint8_t *body;
size_t blen;
int ret;
diff --git a/server/responder/pam/pamsrv_util.c b/server/responder/pam/pamsrv_util.c
index 1d0ab103a..ab9b733e5 100644
--- a/server/responder/pam/pamsrv_util.c
+++ b/server/responder/pam/pamsrv_util.c
@@ -114,7 +114,6 @@ bool dp_pack_pam_response(DBusMessage *msg, struct pam_data *pd)
bool dp_unpack_pam_response(DBusMessage *msg, struct pam_data *pd, DBusError *dbus_error)
{
- int ret;
DBusMessageIter iter;
DBusMessageIter sub_iter;
int type;
diff --git a/server/util/nss_sha512crypt.c b/server/util/nss_sha512crypt.c
index 84cb61c27..cb60610b1 100644
--- a/server/util/nss_sha512crypt.c
+++ b/server/util/nss_sha512crypt.c
@@ -164,12 +164,12 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
HASH_Begin(ctx);
/* Add the key string. */
- HASH_Update(ctx, key, key_len);
+ HASH_Update(ctx, (const unsigned char *)key, key_len);
/* The last part is the salt string. This must be at most 16
characters and it ends at the first `$' character (for
compatibility with existing implementations). */
- HASH_Update(ctx, salt, salt_len);
+ HASH_Update(ctx, (const unsigned char *)salt, salt_len);
/* Compute alternate SHA512 sum with input KEY, SALT, and KEY. The
@@ -177,13 +177,13 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
HASH_Begin(alt_ctx);
/* Add key. */
- HASH_Update(alt_ctx, key, key_len);
+ HASH_Update(alt_ctx, (const unsigned char *)key, key_len);
/* Add salt. */
- HASH_Update(alt_ctx, salt, salt_len);
+ HASH_Update(alt_ctx, (const unsigned char *)salt, salt_len);
/* Add key again. */
- HASH_Update(alt_ctx, key, key_len);
+ HASH_Update(alt_ctx, (const unsigned char *)key, key_len);
/* Now get result of this (64 bytes) and add it to the other
context. */
@@ -201,7 +201,7 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
if ((cnt & 1) != 0) {
HASH_Update(ctx, alt_result, 64);
} else {
- HASH_Update(ctx, key, key_len);
+ HASH_Update(ctx, (const unsigned char *)key, key_len);
}
/* Create intermediate result. */
@@ -212,7 +212,7 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < key_len; ++cnt) {
- HASH_Update(alt_ctx, key, key_len);
+ HASH_Update(alt_ctx, (const unsigned char *)key, key_len);
}
/* Finish the digest. */
@@ -229,7 +229,7 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
/* For every character in the password add the entire password. */
for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt) {
- HASH_Update(alt_ctx, salt, salt_len);
+ HASH_Update(alt_ctx, (const unsigned char *)salt, salt_len);
}
/* Finish the digest. */
@@ -250,26 +250,26 @@ sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
/* Add key or last result. */
if ((cnt & 1) != 0) {
- HASH_Update(ctx, p_bytes, key_len);
+ HASH_Update(ctx, (const unsigned char *)p_bytes, key_len);
} else {
HASH_Update(ctx, alt_result, 64);
}
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0) {
- HASH_Update(ctx, s_bytes, salt_len);
+ HASH_Update(ctx, (const unsigned char *)s_bytes, salt_len);
}
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0) {
- HASH_Update(ctx, p_bytes, key_len);
+ HASH_Update(ctx, (const unsigned char *)p_bytes, key_len);
}
/* Add key or last result. */
if ((cnt & 1) != 0) {
HASH_Update(ctx, alt_result, 64);
} else {
- HASH_Update(ctx, p_bytes, key_len);
+ HASH_Update(ctx, (const unsigned char *)p_bytes, key_len);
}
/* Create intermediate result. */