Make char* parameters const
[samba.git] / source / libsmb / libsmb_context.c
index 489cc01c864338ffe0316a4a7b6b02879d4db7e1..ec163114126556a24f7be26c4f35909c7c648be4 100644 (file)
@@ -630,11 +630,11 @@ smbc_version(void)
  * Set the credentials so DFS will work when following referrals.
  */
 void
-smbc_set_credentials(char *workgroup,
-                     char *user,
-                     char *password,
+smbc_set_credentials(const char *workgroup,
+                     const char *user,
+                     const char *password,
                      smbc_bool use_kerberos,
-                     char *signing_state)
+                     const char *signing_state)
 {
         
         set_cmdline_auth_info_username(user);
@@ -648,9 +648,9 @@ smbc_set_credentials(char *workgroup,
 }
 
 void smbc_set_credentials_with_fallback(SMBCCTX *context,
-                                       char *workgroup,
-                                       char *user,
-                                       char *password)
+                                       const char *workgroup,
+                                       const char *user,
+                                       const char *password)
 {
        smbc_bool use_kerberos = false;
        const char *signing_state = "off";
@@ -675,11 +675,8 @@ void smbc_set_credentials_with_fallback(SMBCCTX *context,
                signing_state = "force";
        }
 
-       smbc_set_credentials(workgroup,
-                            user,
-                            password,
-                            use_kerberos,
-                            (char *)signing_state);
+       smbc_set_credentials(workgroup, user, password,
+                             use_kerberos, signing_state);
 
        if (smbc_getOptionFallbackAfterKerberos(context)) {
                cli_cm_set_fallback_after_kerberos();