summaryrefslogtreecommitdiff
path: root/net/samba33/patches/patch-aq
blob: ac460555ccd4620c70442851a081986b61f84987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
$NetBSD: patch-aq,v 1.2 2010/03/02 14:56:22 taca Exp $

Add support for:

	passwd expand gecos
	state directory

--- param/loadparm.c.orig	2010-02-25 09:46:35.000000000 +0000
+++ param/loadparm.c
@@ -121,6 +121,7 @@ struct global {
 	char *szDeletePrinterCommand;
 	char *szOs2DriverMap;
 	char *szLockDir;
+	char *szStateDir;
 	char *szPidDir;
 	char *szRootdir;
 	char *szDefaultService;
@@ -297,6 +298,7 @@ struct global {
 	bool bUnixPasswdSync;
 	bool bPasswdChatDebug;
 	int iPasswdChatTimeout;
+	bool bPasswdExpandGecos;
 	bool bTimestampLogs;
 	bool bNTSmbSupport;
 	bool bNTPipeSupport;
@@ -1248,6 +1250,15 @@ static struct parm_struct parm_table[] =
 		.flags		= FLAG_ADVANCED,
 	},
 	{
+		.label		= "passwd expand gecos",
+		.type		= P_BOOL,
+		.p_class	= P_GLOBAL,
+		.ptr		= &Globals.bPasswdExpandGecos,
+		.special	= NULL,
+		.enum_list	= NULL,
+		.flags		= FLAG_ADVANCED,
+	}, 
+	{
 		.label		= "check password script",
 		.type		= P_STRING,
 		.p_class	= P_GLOBAL,
@@ -3729,6 +3740,15 @@ static struct parm_struct parm_table[] =
 		.flags		= FLAG_HIDE,
 	},
 	{
+		.label		= "state directory",
+		.type		= P_STRING,
+		.p_class	= P_GLOBAL,
+		.ptr		= &Globals.szStateDir,
+		.special	= NULL,
+		.enum_list	= NULL,
+		.flags		= FLAG_ADVANCED
+	}, 
+	{
 		.label		= "pid directory",
 		.type		= P_STRING,
 		.p_class	= P_GLOBAL,
@@ -4667,6 +4687,7 @@ static void init_globals(bool first_time
 	string_set(&Globals.szPasswdProgram, "");
 	string_set(&Globals.szPidDir, get_dyn_PIDDIR());
 	string_set(&Globals.szLockDir, get_dyn_LOCKDIR());
+	string_set(&Globals.szStateDir, get_dyn_STATEDIR());
 	string_set(&Globals.szSocketAddress, "0.0.0.0");
 
 	if (asprintf(&s, "Samba %s", SAMBA_VERSION_STRING) < 0) {
@@ -4759,6 +4780,7 @@ static void init_globals(bool first_time
 	Globals.bPamPasswordChange = False;
 	Globals.bPasswdChatDebug = False;
 	Globals.iPasswdChatTimeout = 2; /* 2 second default. */
+	Globals.bPasswdExpandGecos = False;
 	Globals.bNTPipeSupport = True;	/* Do NT pipes by default. */
 	Globals.bNTStatusSupport = True; /* Use NT status by default. */
 	Globals.bStatCache = True;	/* use stat cache by default */
@@ -4999,6 +5021,7 @@ FN_GLOBAL_STRING(lp_addprinter_cmd, &Glo
 FN_GLOBAL_STRING(lp_deleteprinter_cmd, &Globals.szDeletePrinterCommand)
 FN_GLOBAL_STRING(lp_os2_driver_map, &Globals.szOs2DriverMap)
 FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir)
+FN_GLOBAL_STRING(lp_statedir, &Globals.szStateDir)
 FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir)
 FN_GLOBAL_STRING(lp_mangling_method, &Globals.szManglingMethod)
 FN_GLOBAL_INTEGER(lp_mangle_prefix, &Globals.mangle_prefix)
@@ -5178,6 +5201,7 @@ FN_GLOBAL_BOOL(lp_pam_password_change, &
 FN_GLOBAL_BOOL(lp_unix_password_sync, &Globals.bUnixPasswdSync)
 FN_GLOBAL_BOOL(lp_passwd_chat_debug, &Globals.bPasswdChatDebug)
 FN_GLOBAL_INTEGER(lp_passwd_chat_timeout, &Globals.iPasswdChatTimeout)
+FN_GLOBAL_BOOL(lp_passwd_expand_gecos, &Globals.bPasswdExpandGecos)
 FN_GLOBAL_BOOL(lp_nt_pipe_support, &Globals.bNTPipeSupport)
 FN_GLOBAL_BOOL(lp_nt_status_support, &Globals.bNTStatusSupport)
 FN_GLOBAL_BOOL(lp_stat_cache, &Globals.bStatCache)