samba/samba-3.0.0rc3-nmbd-netbiosname.patch
cvsdist e56dc1be32 auto-import changelog data from samba-3.0.0-15.src.rpm
* Thu Sep 25 2003 Jay Fenlason <fenlason@redhat.com> 3.0.0-15
- New 3.0.0 final release
- merge nmbd-netbiosname and testparm patches from 3E branch
- updated the -logfiles patch to work against 3.0.0
- updated the pie patch
- update the VERSION file during build
- use make -j if avaliable
- merge the winbindd_privileged change from 3E
- merge the "rm /usr/lib" patch that allows Samba to build on 64-bit
  platforms despite the broken Makefile

* Mon Aug 18 2003 Jay Fenlason <fenlason@redhat.com>
- Merge from samba-3E-branch after samba-3.0.0rc1 was released

* Wed Jul 23 2003 Jay Fenlason <fenlason@redhat.com> 3.0.0-3beta3
- Merge from 3.0.0-2beta3.3E
- (Correct log file names (#100981).)
- (Fix pidfile directory in samab.log)
- (Remove obsolete samba-3.0.0beta2.tar.bz2.md5 file)
- (Move libsmbclient to the -common package (#99449))

* Sun Jun 22 2003 Nalin Dahyabhai <nalin@redhat.com> 2.2.8a-4
- rebuild

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed May 28 2003 Jay Fenlason <fenlason@redhat.com> 2.2.8a-2
- add libsmbclient.so for gnome-vfs-extras
- Edit specfile to specify /var/run for pid files
- Move /tmp/.winbindd/socket to /var/run/winbindd/socket

* Wed May 14 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- add proper ldconfig calls

* Thu Apr 24 2003 Jay Fenlason <fenlason@redhat.com> 2.2.8a-1
- upgrade to 2.2.8a
- remove old .md5 files
- add "pid directory = /var/run" to the smb.conf file.  Fixes #88495
- Patch from jra@dp.samba.org to fix a delete-on-close regression
2004-09-09 12:08:44 +00:00

91 lines
3.0 KiB
Diff

diff -ur samba-3.0.0rc3/source/lib/popt_common.c samba-3.0.0rc3-lhh/source/lib/popt_common.c
--- samba-3.0.0rc3/source/lib/popt_common.c 2003-09-10 13:57:00.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/lib/popt_common.c 2003-09-11 13:49:24.000000000 -0400
@@ -87,7 +87,7 @@
case 'n':
if (arg) {
- set_global_myname(arg);
+ set_global_myname_override(arg);
}
break;
diff -ur samba-3.0.0rc3/source/lib/util.c samba-3.0.0rc3-lhh/source/lib/util.c
--- samba-3.0.0rc3/source/lib/util.c 2003-09-08 12:04:35.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/lib/util.c 2003-09-11 13:47:18.000000000 -0400
@@ -84,6 +84,7 @@
***********************************************************************/
static char *smb_myname;
+static char *smb_myname_override;
static char *smb_myworkgroup;
static char *smb_scope;
static int smb_num_netbios_names;
@@ -108,6 +109,27 @@
return smb_myname;
}
+
+/***********************************************************************
+ Allocate and set override for myname. Ensure upper case.
+***********************************************************************/
+
+BOOL set_global_myname_override(const char *myname)
+{
+ SAFE_FREE(smb_myname_override);
+ smb_myname_override = strdup(myname);
+ if (!smb_myname_override)
+ return False;
+ strupper_m(smb_myname_override);
+ return True;
+}
+
+const char *global_myname_override(void)
+{
+ return smb_myname_override;
+}
+
+
/***********************************************************************
Allocate and set myworkgroup. Ensure upper case.
***********************************************************************/
diff -ur samba-3.0.0rc3/source/nmbd/nmbd.c samba-3.0.0rc3-lhh/source/nmbd/nmbd.c
--- samba-3.0.0rc3/source/nmbd/nmbd.c 2003-09-10 13:57:00.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/nmbd/nmbd.c 2003-09-11 14:05:21.000000000 -0400
@@ -608,6 +608,7 @@
{"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"},
{"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
POPT_COMMON_SAMBA
+ POPT_COMMON_CONNECTION
{ NULL }
};
diff -ur samba-3.0.0rc3/source/param/loadparm.c samba-3.0.0rc3-lhh/source/param/loadparm.c
--- samba-3.0.0rc3/source/param/loadparm.c 2003-09-08 12:04:35.000000000 -0400
+++ samba-3.0.0rc3-lhh/source/param/loadparm.c 2003-09-11 14:00:51.000000000 -0400
@@ -1327,7 +1327,10 @@
*/
string_set(&Globals.szPasswdChat, DEFAULT_PASSWD_CHAT);
- set_global_myname(myhostname());
+ if (!global_myname_override())
+ set_global_myname(myhostname());
+ else
+ set_global_myname(global_myname_override());
string_set(&Globals.szNetbiosName,global_myname());
set_global_myworkgroup(WORKGROUP);
@@ -2698,6 +2701,12 @@
BOOL ret;
pstring netbios_name;
+ if (global_myname_override()) {
+ DEBUG(4, ("handle_netbios_name: ignoring netbios name "
+ "parameter"));
+ return True;
+ }
+
pstrcpy(netbios_name, pszParmValue);
standard_sub_basic(current_user_info.smb_name, netbios_name,sizeof(netbios_name));