1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

41 Commits

Author SHA1 Message Date
Jeremy Allison
7e8e91aeb3 More logical operation on bool.
Jeremy.
2008-01-04 23:26:47 -08:00
Jeremy Allison
a317f70c22 Remove pstring from nmbd.
Jeremy.
2007-11-19 15:15:09 -08:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
a8082a3c7c r23015: Make message_(de)register static to messages.c 2007-10-10 12:22:15 -05:00
Volker Lendecke
0ad4b1226c r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
2007-10-10 12:21:52 -05:00
Jeremy Allison
140881cfbb r22045: As Volker noticed, skip_string's last argument is
redundent. Remove it.
Jeremy.
2007-10-10 12:19:05 -05:00
Jeremy Allison
c3a565081d r22014: Make us pass RANDOMIPC test again :-(. This is an ugly check-in,
but I've no option.
Jeremy.
2007-10-10 12:19:01 -05:00
Volker Lendecke
c8ae60ed65 r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
2007-10-10 12:17:32 -05:00
Volker Lendecke
7729799be9 r15483: Fix 'declaration after code' warnings.
Volker
2007-10-10 11:16:54 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
834d816caf Use "unix netbios name" type unstring - 64 bytes long to manipulate netbios
names in nmbd. Allows conversion from dos codepage mb strings (ie. SJIS) to
expand to utf8 size on read.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d7cf64b1e4 Ensure we don't truncate strcmps to nstring anymore...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b4ea493599 Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com (MORIYAMA Masayuki).
Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios
and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name
when represented in dos charset (ie. cp932). So go back to using fstrings for these but
translate into nstrings (ie. 16 byte length values) for transport on the wire.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d7e35dfb92 Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at
all and I really want to discourage that.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
35a0b3c035 Fixed off-by-one bugs in workgroup name comparisons. Complain when a
workgroup name is >15 characters.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
be534c8adf Ensure we use correct length nstrings for workgroup and browser names.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
84ae44678a Fix the character set handling properly in nmbd. Also fix bug where
iconv wasn't re-initialised on reading of "charset" parameters. This
caused workgroup name to be set incorrectly if it contained an
extended character.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
236d6adadf Half-way though the big conversion of all nmbd access to wire elements being
converted to pull/push_ascii. This will not work right at the moment for non
English codepages, but compiles - I will finish the work over the weekend.
Then nmbd should be completely codepage correct.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ff222716a0 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
2e3710f672 use pstrcpy_base() 0001-01-01 00:00:00 +00:00
Jim McDonough
c5876f9f07 replace pstrcpy 0001-01-01 00:00:00 +00:00
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. 0001-01-01 00:00:00 +00:00
Herb Lewis
c105859304 merge profile data changes from 2.2 0001-01-01 00:00:00 +00:00
Andrew Tridgell
f1c49ca7ce - changed the msg_type to be an int instead of an enum so that it is
easier to add new message types to messages.h without breaking old
binaries

- added a MSG_FORCE_ELECTION message to force nmbd to hold an election
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b563be824b this looks like a big commit, but it isn't really :)
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()

this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
453a822a76 first pass at updating head branch to be to be the same as the SAMBA_2_0 branch 0001-01-01 00:00:00 +00:00
Matthew Chapman
4a23a358b5 Trying to improve DC location & browsing performance for the average user
who doesn't know what an LMB or DMB is.

* check_master_browser_exists now performs the check the first time
around, so if there is indeed no master browser then Samba takes up the job
much faster.

* Upped default OS level to 32. There is no reason why some stupid little
Windows box should become LMB instead of a Samba *server*.

* "domain master" now defaults to "auto". Currently this attempts to
become DMB iff Samba is the PDC (ala Windows NT). "preferred master" also
defaults to "auto", which enables preferred master iff Samba is DMB.

* lp_server_role now just returns the predetermined role, rather than
working it out each time, since the server role is becoming very heavily
used (esp for the BDC code).
0001-01-01 00:00:00 +00:00
Jeremy Allison
9ee8f39aed Removed acconfig.h configure configure.in include/config.h.in: Made smbwrapper not made
by default.
nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include
	   file problem...sigh.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
7d455ee637 added a dest_port parameter to send_mailslot() so we send replies to
the correct port in environments like ip masq.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4ab3d16827 nmbd_elections.c: Removed force elections code to bring into line with 1.9.18.
nmbd_namelistdb.c: Added comment for Chris.
nmbd_subnetdb.c: Went back to Chris's comparison code as with the make_nmb_name
                 change it all works now.
lib/rpc/server/srv_netlog.c: Ensure we return 'account disabled' for disabled
                             accounts, rather than crashing.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
a38d903d20 Added code to do elections when told to do so.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1fcb094ba0 nisppass.c: Fixed incorrect parameter usage.
nmbd_become_lmb.c: Add 'force_new_election' parameter to some functions.
                   This allows the start of the election to be done *after*
                   the demotion from local master browser is done.
                   Also changed code so release of 1d name is done
                   immediately to allow other local master to gain it.
nmbd_elections.c: Ensured no elections are run until we have registered
                  the WORKGROUP<1e> name that we must listen on to participate
                  in elections.
nmbd_incomingdgrams.c: Use force_new_election code.
nmbd_namelistdb.c: Make update_name_in_namelist static.
nmbd_subnetdb.c: Fix bug in comparison function. We cannot use memcmp
                   as structure packing may make this fail.
nmbd_packets.c: Ensure that we only send one release packet when
                sending a broadcast packet.
nmbd_workgroupdb.c: Ensure we put the correct value in the ElectionCriterion field.
nmblib.c: Ensure make_nmb_name zero's the struct nmb_name.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
866406bfe3 This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.

This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b9c1697723 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f7591109b9 nmbd_elections.c: Added new parameter to dump_workgroups call.
nmbd_incomingdgrams.c: Deal with announcements with servertype == 0 - these
 are announcements that a machine is shutting down and must be treated differently.
nmbd_serverlistdb.c: Exposed remove_server_from_workgroup as external.
  Added code to dump out workgroups on signal correctly.
nmbd_workgroupdb.c: Added new parameter to dump_workgroups call.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d80b0cb645 This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
0001-01-01 00:00:00 +00:00