/* entry (if/when the 'available' keyword is implemented!). */
/* the printer name is set to the service name. */
- lpcfg_string_set(service, &service->szPrintername, pszPrintername);
+ lpcfg_string_set(service, &service->_printername, pszPrintername);
lpcfg_string_set(service, &service->comment, comment);
service->browseable = default_service->browseable;
/* Printers cannot be read_only. */
myname = get_myname(lp_ctx);
lpcfg_do_global_parameter(lp_ctx, "netbios name", myname);
talloc_free(myname);
- lpcfg_do_global_parameter(lp_ctx, "name resolve order", "wins host bcast");
+ lpcfg_do_global_parameter(lp_ctx, "name resolve order", "lmhosts wins host bcast");
lpcfg_do_global_parameter(lp_ctx, "fstype", "NTFS");
lpcfg_do_global_parameter(lp_ctx, "usershare owner only", "yes");
+ lpcfg_do_global_parameter(lp_ctx, "-valid", "yes");
+
+ lpcfg_do_global_parameter_var(lp_ctx, "usershare path", "%s/usershares", get_dyn_STATEDIR());
+
+#ifdef DEVELOPER
+ lpcfg_do_global_parameter_var(lp_ctx, "panic action", "/bin/sleep 999999999");
+#endif
+
+ lpcfg_do_global_parameter(lp_ctx, "smb passwd file", get_dyn_SMB_PASSWD_FILE());
+
+ lpcfg_do_global_parameter(lp_ctx, "logon home", "\\\\%N\\%U");
+
for (i = 0; parm_table[i].label; i++) {
if (!(lp_ctx->flags[i] & FLAG_CMDLINE)) {
lp_ctx->flags[i] |= FLAG_DEFAULT;
}
/**
- * If we are PDC then prefer us as DMB
+ * Return the correct printer name.
*/
const char *lpcfg_printername(struct loadparm_service *service, struct loadparm_service *sDefault)
{
const char *ret;
- ret = lp_string((const char *)((service != NULL && service->szPrintername != NULL) ?
- service->szPrintername : sDefault->szPrintername));
+ ret = lp_string((const char *)((service != NULL && service->_printername != NULL) ?
+ service->_printername : sDefault->_printername));
if (ret == NULL || (ret != NULL && *ret == '\0'))
ret = lpcfg_servicename(service);