Bug in rnetservergetinfo?
Alexander Bokovoy
a.bokovoy at sam-solutions.net
Mon Oct 27 19:03:06 GMT 2003
Greetings!
Looks like there is no convertion of server comment in rNetServerGetInfo
RAP call in source/smbd/lanman.c so that returned server comment (server
string) is being passed to the caller in unix charset instead of dos
charset.
What charset should be there on the wire?
--
/ Alexander Bokovoy
Samba Team http://www.samba.org/
ALT Linux Team http://www.altlinux.org/
Midgard Project Ry http://www.midgard-project.org/
-------------- next part --------------
Index: source/smbd/lanman.c
===================================================================
RCS file: /home/cvs/samba/source/smbd/lanman.c,v
retrieving revision 1.73.2.20
diff -u -r1.73.2.20 lanman.c
--- source/smbd/lanman.c 16 Oct 2003 00:45:17 -0000 1.73.2.20
+++ source/smbd/lanman.c 27 Oct 2003 15:47:37 -0000
@@ -2346,14 +2346,16 @@
pstring comment;
uint32 servertype= lp_default_server_announce();
- pstrcpy(comment,string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH));
+ push_ascii(comment, lp_serverstring(), MAX_SERVER_STRING_LENGTH, STR_TERMINATE);
+// pstrcpy(comment,string_truncate(lp_serverstring(), MAX_SERVER_STRING_LENGTH));
if ((count=get_server_info(SV_TYPE_ALL,&servers,lp_workgroup()))>0) {
for (i=0;i<count;i++)
if (strequal(servers[i].name,local_machine))
{
servertype = servers[i].type;
- pstrcpy(comment,servers[i].comment);
+ push_ascii(comment, servers[i].comment, -1, STR_TERMINATE);
+ // pstrcpy(comment,servers[i].comment);
}
}
SAFE_FREE(servers);
More information about the samba-technical
mailing list