summaryrefslogtreecommitdiffstats
path: root/source/lib/substitute.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-29 07:28:32 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-29 07:28:32 +0000
commite7634f81c5116ff4addfb7e495f54b6bb78e8f77 (patch)
treed6b9d59d7c72318bda6c3741f263fe506628192a /source/lib/substitute.c
parent8f607810eb24ed1157bbd2e896c2c167bc34d986 (diff)
downloadsamba-e7634f81c5116ff4addfb7e495f54b6bb78e8f77.tar.gz
samba-e7634f81c5116ff4addfb7e495f54b6bb78e8f77.tar.xz
samba-e7634f81c5116ff4addfb7e495f54b6bb78e8f77.zip
This commit is number 3 of 4.
In particular this commit focuses on: Changing the Get_Pwnam code so that it can work in a const-enforced environment. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes allow for 'const' in the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username
Diffstat (limited to 'source/lib/substitute.c')
-rw-r--r--source/lib/substitute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 5336eb947f4..60ff62cb06e 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -186,7 +186,7 @@ void standard_sub_basic(char *str)
string_sub(p,"%U",tmp_str,l);
break;
case 'G' :
- if ((pass = Get_Pwnam(current_user_info.smb_name, False))!=NULL) {
+ if ((pass = Get_Pwnam(current_user_info.smb_name))!=NULL) {
string_sub(p,"%G",gidtoname(pass->pw_gid),l);
} else {
p += 2;