From 853b5c87ec5ac499a8320edb7b3bc2672a5a49e4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 16 Mar 2001 06:17:11 +0000 Subject: fixed volume_name(). It used dos_to_unix() which uses a static buffer, and that buffer got clobbered in the trans2 QFS_VOLUME_INFO call, so the volume label always showed as "." from NT clients. (This used to be commit 2131d8bf76733d7cf046aa651d11bf3dade0913d) --- source3/param/loadparm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 85329e8c53..aebf43c9a5 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3361,7 +3361,10 @@ char *volume_label(int snum) /* lp_volume returns a unix charset - lp_servicename returns a dos codepage - convert so volume_label() always returns UNIX. */ - return (dos_to_unix(lp_servicename(snum), False)); + char *p = dos_to_unix(lp_servicename(snum), False); + int len = strlen(p)+1; + ret = (char *)talloc(lp_talloc, len); + memcpy(ret, p, len); } return (ret); } -- cgit