summaryrefslogtreecommitdiffstats
path: root/source/lib/substitute.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-02 20:44:50 +0000
committerJeremy Allison <jra@samba.org>2006-02-02 20:44:50 +0000
commit130b5e80f1917a3eb52568ce114af465ad068c52 (patch)
tree5f5186f7190610b4697292e7674c8b9529f7261f /source/lib/substitute.c
parentd13e343dc7bfa1e30d7b54b59ab202b3f52ea954 (diff)
downloadsamba-130b5e80f1917a3eb52568ce114af465ad068c52.tar.gz
samba-130b5e80f1917a3eb52568ce114af465ad068c52.tar.xz
samba-130b5e80f1917a3eb52568ce114af465ad068c52.zip
r13293: Rather a big patch I'm afraid, but this should fix bug #3347
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.
Diffstat (limited to 'source/lib/substitute.c')
-rw-r--r--source/lib/substitute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 344f6e06fdf..30e1d97ca9b 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -840,11 +840,11 @@ void standard_sub_snum(int snum, char *str, size_t len)
/* calling uidtoname() on every substitute would be too expensive, so
we cache the result here as nearly every call is for the same uid */
- if (cached_uid != current_user.uid) {
- fstrcpy(cached_user, uidtoname(current_user.uid));
- cached_uid = current_user.uid;
+ if (cached_uid != current_user.ut.uid) {
+ fstrcpy(cached_user, uidtoname(current_user.ut.uid));
+ cached_uid = current_user.ut.uid;
}
- standard_sub_advanced(snum, cached_user, "", current_user.gid,
+ standard_sub_advanced(snum, cached_user, "", current_user.ut.gid,
smb_user_name, str, len);
}