summaryrefslogtreecommitdiff
path: root/source3/lib/substitute.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r25025: Remove an unused functionVolker Lendecke1-5/+0
(This used to be commit 858f7b7d786ca352ffebb56b9fda40c636acef74)
2007-10-10r24949: Remove some static buffersVolker Lendecke1-5/+5
(This used to be commit df648d47ff3c4e24f439fda839653bda98323100)
2007-10-10r24589: Refactor our vuid code so that we keep the sameJeremy Allison1-1/+1
vuid that was allocated whilst the connection is being constructed and after the connection has been set up. This is what Windows does and at least one client (and HP printer) depends on this behaviour. As it depends on the req struct not yet ported to SAMBA_3_2_0 (Volker, hint hint.... :-) I am not yet adding this to that branch, but will investigate that tomorrow. Jeremy. (This used to be commit a54f2805df92c67e74a6764568eedebe394fd500)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23410: Merge the core of the cluster code.Volker Lendecke1-1/+5
I'm 100% certain I've forgotten to merge something, but the main code should be in. It's mainly in dbwrap_ctdb.c, ctdbd_conn.c and messages_ctdbd.c. There should be no changes to the non-cluster case, it does survive make test on my laptop. It survives some very basic tests with ctdbd enables, I did not do the full test suite for clusters yet. Phew... Volker (This used to be commit 15553d6327a3aecdd2b0b94a3656d04bf4106323)
2007-10-10r17039: Eliminate snum from enumshares and getshareinfo. Get rid of some ↵Volker Lendecke1-1/+24
pstrings. Volker (This used to be commit c5e393d5eda4e13a844171d9ff319d1f1bac3d84)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-120/+62
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r15494: Fix debug statementVolker Lendecke1-1/+1
(This used to be commit 8cdfe404ef095901bf1d87fb80b3252eca49c8df)
2007-10-10r14075: * add support for long variable names in smb.conf in the form of %(....)Gerald Carter1-210/+155
* add support for %(DomainSID) * replace standard_sub_XXX() functions with wrappers around their alloc_sub_XXX() counterparts * add support for using SIDs in read list, et. al. (anything that is checked by nt_token_contains_name_in_list()) (This used to be commit 71d960250d2c6d01096a03e98884d3f9c395baa0)
2007-10-10r13971: Fix Coverity bugs #209 - #213 - it detected mistakesJeremy Allison1-56/+67
in the pointer aliasing once realloc could change a pointer. This was in the bugzilla.samba.org database as #687 but we never figured out what it was ! Jeremy. (This used to be commit 8d183441403524fe39e79af843d6cfe65898f7d3)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-4/+4
by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy. (This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10r13058: Add %w macro for the winbind seperator which allows us for exampleLars Müller1-0/+6
valid users = %S, %D%w%S (This used to be commit 6ff25eb8402ed006ac5e081f64bd9e074fe22295)
2007-10-10r11655: Two small fixesGerald Carter1-4/+26
* remove redundant call to sub_set_smb_name() in session setup code. * Fix lockup when running 'wbinfo -t' on a Samba PDC. Cause was new authenticated session setup from winbindd which resulted in a mangled username (machine_) that was not found in the local files and so was queiued up to nss_winbindd. Deadlock.... So now make sure to keep the trailing '$' for machine account names when calling sub_set_smb_name(). (This used to be commit b0a2d43b603c2e230da6ada73587696605102e8f)
2007-10-10r11159: Added some const to fix warnings.Jeremy Allison1-2/+2
Jeremy. (This used to be commit de27b0eef2eb021f28e8bf300c4dd524e30fc7ed)
2007-10-10r8899: various compiler warning fixes reported by Jason Mader ↵Gerald Carter1-1/+1
<jason@ncac.gwu.edu> (This used to be commit d8ae9f2b3e5387ef2c4e84cd9c33f4a7c795b0d3)
2007-10-10r8686: Revert %LOGONSERVER%-substitution. The substition is done on the client,Günther Deschner1-8/+8
not on the server. We now preserve this windows variable (important for vampired setups) and correctly substitute only the "%L"s in strings like: "%LOGONSERVER% %L %lOgOnSeRvEr% %L". Guenther (This used to be commit dccf777f42ce1d3f788548842fb8a606bed5708c)
2007-10-10r8493: According to MSKB 141714 the %LOGONSERVER% variable should beGünther Deschner1-2/+7
substituted like our %L-variable. Guenther (This used to be commit 294fdbccba9835b6abe5f26f22a0a05adb27564e)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-1/+2
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r5174: ensure that we consistently use the current_user_info.smb_name vs. ↵Gerald Carter1-0/+12
smb_name when parsing smb.conf and reloading config files (This used to be commit be537eaebe84b2ccae089e5982263df8a96e7a5b)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-5/+5
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3049: fixing some calls in the printing code to stanard_sub_basic(); fix ↵Gerald Carter1-3/+5
standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced() (This used to be commit 8c3fd1908d201e9891878ff4c3259ed9690dff97)
2007-10-10r647: fix for setting the called name to by our IP if the called name was ↵Gerald Carter1-6/+6
*SMBSERVER and *SMBSERV -- fixes issue with connecting to printers via \ip.ad.dr.ess\printer UNC path (This used to be commit 8ee268f0ed0c2f75ded9c2ddd66e0953f443c79e)
2004-03-19BUG 417: fix %UuGg variables expansion in include lines setging the ↵Gerald Carter1-0/+5
current_user_info struct in register_vuid() -- shouldn't be any more broken than we were (This used to be commit a90c3bd281e7a62bb8482e42aa3b674eeeb5995a)
2003-12-08working on bug 687; protect against null src strings in alloc_sub_basic()Gerald Carter1-0/+7
(This used to be commit 6cf91bce40f85879de00b9ce89ad9b5e04a50b35)
2003-11-07Implement %i-Macro for the locally used IP address. With this you can againVolker Lendecke1-0/+3
have virtual hosts with different configurations on a single smbd even on port 445. Volker (This used to be commit 3a7c8c4f0e7fcfc2e20e1ad5e4b8e3c215ef1f0d)
2003-11-05make sure that we expand %H (from vl); bug 612Gerald Carter1-0/+3
(This used to be commit a77f5924304d03d8033d1ef5f6526373f5b67aa3)
2003-10-22Put strcasecmp/strncasecmp on the banned list (except for needed callsJeremy Allison1-2/+2
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at all and I really want to discourage that. Jeremy. (This used to be commit d7e35dfb9283d560d0ed2ab231f36ed92767dace)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-3/+3
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
2003-08-28Fix bug found by tridge in 2.2.x. Ensure that %U substitution isJeremy Allison1-4/+17
restored on next valid packet if a logon fails. This has relevence if people are using su.exe within logon scripts ! Jeremy. (This used to be commit d405a93a9d3f9a1d93bb3289b00683fba3160bbe)
2003-08-20metze's autogenerate patch for version.hGerald Carter1-2/+2
(This used to be commit ae452e51b02672a56adf18aa7a7e365eeaba9272)
2003-07-27If we strupper_m after the alpha_strcpy() we know that it is less likalyAndrew Bartlett1-2/+2
to contain multibyte charcters, as these should have been stripped. Andrew Bartlett (This used to be commit 0f7c1dda222d583212b8be2febe95ce7e1c0ba24)
2003-07-03Removed strupper/strlower macros that automatically map to ↵Jeremy Allison1-6/+6
strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy. (This used to be commit ff222716a08af65d26ad842ce4c2841cc6540959)
2003-06-17Const fixes by metzeVolker Lendecke1-4/+4
Volker (This used to be commit c0e35f3be8a33f19823826c5a84c885764c62508)
2003-04-23Fix this for both *SMBSERVER and *SMBSERV as per comments in loadparm.c.Andrew Bartlett1-1/+9
Andrew Bartlett (This used to be commit c6d416541be5349254a63e30fa29b022516b094e)
2003-04-23Try to avoid setting *SMBSERVER as a 'local name'.Andrew Bartlett1-0/+3
Andrew Bartlett (This used to be commit 5b5e167bb1a760a4f9c603feea886ce1dab52e19)
2003-03-18Add an extra parameter to our 'set_remote_machine_name' andAndrew Bartlett1-2/+29
'set_local_machine_name' so that the client can't change it from under us. (.NET RC2 and WinXP install calls the machine 'machinename' during NTLMSSP on the domain join). Andrew Bartlett (This used to be commit 4c7163e7c2cc09bd95faa05156ee480957a7a4d8)
2002-11-20merged the %U changes to 3.0Andrew Tridgell1-5/+24
(This used to be commit 58fa6bfee8ba35cc182c18c980e0a4040ddd7d09)
2002-11-12Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison1-4/+3
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-2/+20
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-08-17sync 3.0 branch with headJelmer Vernooij1-9/+44
(This used to be commit 3928578b52cfc949be5e0ef444fce1558d75f290)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-63/+367
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-17A nice *big* change to the fundemental way we do things.Andrew Bartlett1-1/+0
Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps them around for a long time - often past the next call... This adds a getpwnam_alloc and a getpwuid_alloc to the collection. These function as expected, returning a malloced structure that can be free()ed with passwd_free(&passwd). This patch also cuts down on the number of calls to getpwnam - mostly by taking advantage of the fact that the passdb interface is already case-insensiteve. With this patch most of the recursive cases have been removed (that I know of) and the problems are reduced further by not using the sys_ interface in the new code. This means that pointers to the cache won't be affected. (This is a tempoary HACK, I intend to kill the password cache entirly). The only change I'm a little worried about is the change to rpc_server/srv_samr_nt.c for private groups. In this case we are getting groups from the new group mapping DB. Do we still need to check for private groups? I've toned down the check to a case sensitve match with the new code, but we might be able to kill it entirly. I've also added a make_modifyable_passwd() function, that copies a passwd struct into the form that the old sys_getpw* code provided. As far as I can tell this is only actually used in the pass_check.c crazies, where I moved the final 'special case' for shadow passwords (out of _Get_Pwnam()). The matching case for getpwent() is dealt with already, in lib/util_getent.c Also included in here is a small change to register the [homes] share at vuid creation rather than just in one varient of the session setup. (This picks up the SPNEGO cases). The home directory is now stored on the vuid, and I am hoping this might provide a saner way to do %H substitions. TODO: Kill off remaining Get_Pwnam_Modify calls (they are not needed), change the remaining sys_getpwnam() callers to use getpwnam_alloc() and move Get_Pwnam to return an allocated struct. Andrew Bartlett (This used to be commit 1d86c7f94230bc53daebd4d2cd829da6292e05da)
2002-01-16Separate out get_user_home_dir() from get_user_home_service_dir().Jeremy Allison1-5/+1
Jeremy. (This used to be commit c1b97226db63daf64359e79083a4754e7c7f8054)
2002-01-16Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2.Jeremy Allison1-16/+53
Jeremy. (This used to be commit 0fcca6c627a5c9c2219ec9714df5e0bc1a44cc29)
2001-12-31const religionSimo Sorce1-3/+3
(This used to be commit c0904d96170a9166b8cd405b75ce4a9bbc32ad1b)
2001-12-06again an intrusive patch:Jean-François Micouleau1-11/+9
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the definition of standard_sub_basic() to cope with that. - removed the smb.conf: 'domain admin group' and 'domain guest group' parameters ! We're not playing anymore with the user's group RIDs ! - in get_domain_user_groups(), if the user's gid is a group, put it first in the group RID list. I just have to write an HOWTO now ;-) J.F. (This used to be commit fef52c4b96c987115fb1818c00c2352c67790e50)
2001-11-30Ensured the %G substitution exactly matches what the man page states.Jeremy Allison1-1/+2
Jeremy. (This used to be commit 518084a70d0b20347411535f1dcf7453981499cf)
2001-10-29This commit is number 3 of 4.Andrew Bartlett1-1/+1
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 (This used to be commit e7634f81c5116ff4addfb7e495f54b6bb78e8f77)