#include "tdb.h"
#include "librpc/gen_ndr/nbt.h"
+#ifdef HAVE_HTTPCONNECTENCRYPT
+#include <cups/http.h>
+#endif
+
#define standard_sub_basic talloc_strdup
#include "lib/param/param_global.h"
return true;
}
+bool handle_cups_encrypt(struct loadparm_context *lp_ctx,
+ struct loadparm_service *service,
+ const char *pszParmValue, char **ptr)
+{
+ int result = 0;
+#ifdef HAVE_HTTPCONNECTENCRYPT
+ int value = lp_int(pszParmValue);
+
+ switch (value) {
+ case Auto:
+ result = HTTP_ENCRYPT_REQUIRED;
+ break;
+ case true:
+ result = HTTP_ENCRYPT_ALWAYS;
+ break;
+ case false:
+ result = HTTP_ENCRYPT_NEVER;
+ break;
+ default:
+ result = 0;
+ break;
+ }
+#endif
+ *(int *)ptr = result;
+
+ return true;
+}
+
/***************************************************************************
Initialise a copymap.
***************************************************************************/
#include <sys/sysctl.h>
#endif
-#ifdef HAVE_HTTPCONNECTENCRYPT
-#include <cups/http.h>
-#endif
-
bool bLoaded = false;
extern userdom_struct current_user_info;
return MAX(1, lp__winbind_max_domain_connections());
}
-int lp_cups_encrypt(void)
-{
- int result = 0;
-#ifdef HAVE_HTTPCONNECTENCRYPT
- switch (Globals.cups_encrypt) {
- case Auto:
- result = HTTP_ENCRYPT_REQUIRED;
- break;
- case true:
- result = HTTP_ENCRYPT_ALWAYS;
- break;
- case false:
- result = HTTP_ENCRYPT_NEVER;
- break;
- }
-#endif
- return result;
-}
-
/* These functions remain in source3/param for now */
#include "lib/param/param_functions.c"