summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-02-20 19:48:01 +0000
committerJeremy Allison <jra@samba.org>1998-02-20 19:48:01 +0000
commitc16d4aec00230983973be3b827d1209f5db65d9c (patch)
tree40c9ce5caeef8211ef2381dee11ac8d1200ecc08 /source3/smbd
parentc57e8d404d8ab32fe08e9f85d5326160671b56d5 (diff)
downloadsamba-c16d4aec00230983973be3b827d1209f5db65d9c.tar.gz
samba-c16d4aec00230983973be3b827d1209f5db65d9c.tar.bz2
samba-c16d4aec00230983973be3b827d1209f5db65d9c.zip
nmbd_packets.c: nmbd_subnetdb.c: Patch from Andrey Alekseyev <fetch@muffin.arcadia.spb.ru>
to fix the fact that retransmit_or_expire_response_records() wasn't looking at the WINS subnet. server.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution. smbpass.c: Fix to stop parsing failing on non-valid lines. trans2.c: Fix for volume serial number code. util.c: Patch from jkf@soton.ac.uk to add %p (NIS server path) substitution. Fix for warnings under RH5. gcc 2.8. Jeremy. (This used to be commit e58ab3bbe6e939ba678ad5482e58e0191c8dcbcb)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c9
-rw-r--r--source3/smbd/trans2.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index c2880b0e89..9c25a21000 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -4569,6 +4569,15 @@ void standard_sub(int cnum,char *str)
case 'S' : string_sub(p,"%S",lp_servicename(Connections[cnum].service)); break;
case 'g' : string_sub(p,"%g",gidtoname(Connections[cnum].gid)); break;
case 'u' : string_sub(p,"%u",Connections[cnum].user); break;
+ /*
+ * Patch from jkf@soton.ac.uk
+ * Left the %N (NIS server name) in standard_sub_basic as it
+ * is a feature for logon servers, hence uses the username.
+ * The %p (NIS server path) code is here as it is used
+ * instead of the default "path =" string in [homes] and so
+ * needs the service name, not the username.
+ */
+ case 'p' : string_sub(p,"%p",automount_path(lp_servicename(Connections[cnum].service))); break;
case '\0' : p++; break; /* don't run off the end of the string */
default : p+=2; break;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 6eda891e32..893f1adc66 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -977,7 +977,7 @@ static int call_trans2qfsinfo(char *inbuf, char *outbuf, int length, int bufsize
* Add volume serial number - hash of a combination of
* the called hostname and the service name.
*/
- SIVAL(pdata,0,str_checksum(lp_servicename(snum)) ^ str_checksum(local_machine) );
+ SIVAL(pdata,0,str_checksum(lp_servicename(snum)) ^ (str_checksum(local_machine)<<16) );
SCVAL(pdata,l2_vol_cch,volname_len);
StrnCpy(pdata+l2_vol_szVolLabel,vname,volname_len);
DEBUG(5,("call_trans2qfsinfo : time = %x, namelen = %d, name = %s\n",st.st_ctime, volname_len,
@@ -1002,7 +1002,7 @@ static int call_trans2qfsinfo(char *inbuf, char *outbuf, int length, int bufsize
* Add volume serial number - hash of a combination of
* the called hostname and the service name.
*/
- SIVAL(pdata,8,str_checksum(lp_servicename(snum)) ^ str_checksum(local_machine) );
+ SIVAL(pdata,8,str_checksum(lp_servicename(snum)) ^ (str_checksum(local_machine)<<16) );
SIVAL(pdata,12,2*strlen(vname));
PutUniCode(pdata+18,vname);
DEBUG(5,("call_trans2qfsinfo : SMB_QUERY_FS_VOLUME_INFO namelen = %d, vol = %s\n", strlen(vname),