summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-10-30 11:26:50 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-10-30 08:12:54 -0400
commit0d52f24cbfc63742555a4be66fc3795ce5c70349 (patch)
treea4c7c841a449568bfd501ac89d0d64b971f16ca6 /server
parentebc27f0240902dc0fc1bdc052406233b78cb303e (diff)
downloadsssd-0d52f24cbfc63742555a4be66fc3795ce5c70349.tar.gz
sssd-0d52f24cbfc63742555a4be66fc3795ce5c70349.tar.bz2
sssd-0d52f24cbfc63742555a4be66fc3795ce5c70349.zip
Fix compiler warnings in krb5_utils-tests.
Diffstat (limited to 'server')
-rw-r--r--server/tests/krb5_utils-tests.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/server/tests/krb5_utils-tests.c b/server/tests/krb5_utils-tests.c
index b79cb7c3..b0f6a1dd 100644
--- a/server/tests/krb5_utils-tests.c
+++ b/server/tests/krb5_utils-tests.c
@@ -63,7 +63,7 @@ void setup_talloc_context(void)
krb5_ctx = talloc_zero(tmp_ctx, struct krb5_ctx);
fail_unless(pd != NULL, "Cannot create krb5_ctx structure.");
- pd->user = USERNAME;
+ pd->user = discard_const(USERNAME);
pd->pw_uid = atoi(UID);
pd->upn = PRINCIPLE_NAME;
pd->cli_pid = atoi(PID);
@@ -97,8 +97,8 @@ void free_talloc_context(void)
START_TEST(test_multiple_substitutions)
{
- char *test_template = BASE"_%u_%U_%u";
- char *expected = BASE"_"USERNAME"_"UID"_"USERNAME;
+ const char *test_template = BASE"_%u_%U_%u";
+ const char *expected = BASE"_"USERNAME"_"UID"_"USERNAME;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -112,8 +112,8 @@ END_TEST
START_TEST(test_username)
{
- char *test_template = BASE"_%u";
- char *expected = BASE"_"USERNAME;
+ const char *test_template = BASE"_%u";
+ const char *expected = BASE"_"USERNAME;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -127,8 +127,8 @@ END_TEST
START_TEST(test_uid)
{
- char *test_template = BASE"_%U";
- char *expected = BASE"_"UID;
+ const char *test_template = BASE"_%U";
+ const char *expected = BASE"_"UID;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -142,8 +142,8 @@ END_TEST
START_TEST(test_upn)
{
- char *test_template = BASE"_%p";
- char *expected = BASE"_"PRINCIPLE_NAME;
+ const char *test_template = BASE"_%p";
+ const char *expected = BASE"_"PRINCIPLE_NAME;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -157,8 +157,8 @@ END_TEST
START_TEST(test_realm)
{
- char *test_template = BASE"_%r";
- char *expected = BASE"_"REALM;
+ const char *test_template = BASE"_%r";
+ const char *expected = BASE"_"REALM;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -172,8 +172,8 @@ END_TEST
START_TEST(test_home)
{
- char *test_template = BASE"_%h";
- char *expected = BASE"_"HOME_DIRECTORY;
+ const char *test_template = BASE"_%h";
+ const char *expected = BASE"_"HOME_DIRECTORY;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -187,8 +187,8 @@ END_TEST
START_TEST(test_ccache_dir)
{
- char *test_template = BASE"_%d";
- char *expected = BASE"_"CCACHE_DIR;
+ const char *test_template = BASE"_%d";
+ const char *expected = BASE"_"CCACHE_DIR;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -202,8 +202,8 @@ END_TEST
START_TEST(test_pid)
{
- char *test_template = BASE"_%P";
- char *expected = BASE"_"PID;
+ const char *test_template = BASE"_%P";
+ const char *expected = BASE"_"PID;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -217,8 +217,8 @@ END_TEST
START_TEST(test_percent)
{
- char *test_template = BASE"_%%";
- char *expected = BASE"_%";
+ const char *test_template = BASE"_%%";
+ const char *expected = BASE"_%";
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -232,7 +232,7 @@ END_TEST
START_TEST(test_unknow_template)
{
- char *test_template = BASE"_%X";
+ const char *test_template = BASE"_%X";
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);
@@ -256,7 +256,7 @@ END_TEST
START_TEST(test_no_substitution)
{
- char *test_template = BASE;
+ const char *test_template = BASE;
char *result;
result = expand_ccname_template(tmp_ctx, kr, test_template);