1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
Commit Graph

1085 Commits

Author SHA1 Message Date
Gerald Carter
2bdcf68ab6 don't free() auto variables; fixes segfault when looking up RefusePasswordChange registry value
(This used to be commit d89b0bff44)
2003-01-21 03:42:38 +00:00
Gerald Carter
52b65f70ca strip any trailing \'s from reg key names in an open
(This used to be commit 03807cd564)
2003-01-19 05:04:20 +00:00
Jim McDonough
e2f2558753 Fix some debug levels (were set to 0 with RPC module patch), and
change one fprintf(stderr,...) to DEBUG.
(This used to be commit 77f8913977)
2003-01-18 20:41:19 +00:00
Gerald Carter
8c6790b6f0 removing extra debug statement
(This used to be commit 657f8c25a5)
2003-01-18 01:41:00 +00:00
Jim McDonough
9eb368e068 Enable dynamic loading of RPC modules. See docs/textdocs/RPC_PLUGGIN.txt for instructions.
(This used to be commit d51e12df78)
2003-01-17 20:57:26 +00:00
Jeremy Allison
074c99a852 Fix reference count bug where smbd's would not terminate with no
open resources.
Jeremy.
(This used to be commit 0173d6fe16)
2003-01-17 06:35:33 +00:00
Andrew Tridgell
96c795cea7 reverted this patch till I sort out the craziness with UNIHDR
(This used to be commit e3d00fa47d)
2003-01-17 06:15:18 +00:00
Andrew Tridgell
ec879eacc2 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
(This used to be commit b9eff31b14)
2003-01-17 04:58:45 +00:00
Gerald Carter
5fb5950258 small merges from SAMBA_3_0; mostly typos, renames, etc...
(This used to be commit 9ac196dad4)
2003-01-15 18:31:46 +00:00
Andrew Bartlett
1fdaca3342 The last of the fstring/pstring mixups, and an extra 'static'.
(This used to be commit b328b67fd8)
2003-01-14 06:46:14 +00:00
Andrew Bartlett
183ccefce7 A couple more pstcpy/fstrcpy mixups - doing an fstrcpy into a pstring is
harmless, but breaks my automated check.
(This used to be commit e5d2b1f6c3)
2003-01-14 06:36:40 +00:00
Gerald Carter
27b05b4df9 typo from merge
(This used to be commit 1f33b4acb3)
2003-01-11 02:36:13 +00:00
Gerald Carter
47873e781d [merge] make sure to updatre print queue cache during timeout_processing() to send notify events; CR 1491
(This used to be commit 142c5029c7)
2003-01-11 02:29:23 +00:00
Gerald Carter
6df2dc56ff a 0 length printer data value is not a memory allocation error; fix CR601
(This used to be commit 3442c270f1)
2003-01-09 19:51:28 +00:00
Andrew Bartlett
ff18825765 We already have one function to move unistr2 -> multibyte-static, so we
don't need a second just for pdb.

Also, remove magic 'is lp_guest_account' test - the magic RID should be
up to the passdb backend to set.

Andrew Bartlett
(This used to be commit f71c8338d3)
2003-01-02 13:10:25 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0ea)
2003-01-02 09:07:17 +00:00
Andrew Bartlett
60f9614400 Move our password change code along a little - use NTSTATUS, and implmenet
minimum password age and min password length for all password changes.

Andrew Bartlett
(This used to be commit 028f808c03)
2003-01-01 04:19:34 +00:00
Simo Sorce
60667264b7 the shutdown call does not have a 16 bit flags, but 2 byte representing booleans
this commit change the structure and code to reflect this

some test revelead I'm right.

some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation
(This used to be commit c5892b656d)
2002-12-30 04:41:27 +00:00
Jeremy Allison
7f23546730 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a)
2002-12-20 20:23:06 +00:00
Gerald Carter
b1cfbb0f69 * fix memory leak when constructing an driver_level_6 structure
and no dependent files (working on smbd memory leak).  No CR# yet.
(This used to be commit f017fa7c47)
2002-12-17 21:35:56 +00:00
Jim McDonough
5f9348d4fc Store printer guid in the dsspooler registry key so we don't have to
query the directory server every time someone asks
(This used to be commit f0fc4e30f6)
2002-12-13 21:54:09 +00:00
Jim McDonough
bfd8043a40 More printer publishing code.
- Add published attribute to info2, needed for win clients to work properly
- Return proper info on getprinter 7

This means you can now look at the sharing tab of a printer and get correct
info about whether it is published or not, and change it.
(This used to be commit adda04379e)
2002-12-13 18:56:48 +00:00
Jim McDonough
2dd0e949d0 Automatic printer publishing when using APW or choosing 'list in the directory' in printer settings. Currently very little is published, and you cannot unpublish because of a bug in win2k clients.
(This used to be commit bbd7c8071a)
2002-12-04 17:28:51 +00:00
Gerald Carter
1ad8139ef1 [merge from app_head]
XP sends GetPrinterData("ChangeId"). So we now respond accordingly.
Possible fix for CR 1147.
(This used to be commit 42a2e7d701)
2002-12-04 01:14:34 +00:00
Andrew Bartlett
af365408d5 Instead of walking the entire group database, grabbing all members of each
group, testing for membership etc, use the already calculated NT_USER_TOKEN.

(which is initgroups() based)

So far we only fill out the 'domain' groups - we need to fill out the
'other sids' as well, and we possibly need to filter the list for 'domain
groups' only (the old code did that), but Win2k doesn't seem to mind
this for now.

I also need to find out what the magic '7' is about.  Fortunetly JF is in town,
so I'll grill him tomorrow :-).

Andrew Bartlett
(This used to be commit 7e846e7387)
2002-11-25 06:54:22 +00:00
Tim Potter
ee90b48633 Spelling fix.
(This used to be commit 43cd6e5a70)
2002-11-20 03:00:32 +00:00
Andrew Tridgell
1abaa7c9d3 more %U fixes for head
(This used to be commit ea3787d819)
2002-11-20 00:39:57 +00:00
Gerald Carter
155048633f formatting fix
(This used to be commit 6ce20a61a8)
2002-11-18 15:45:06 +00:00
Jeremy Allison
250c980119 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.
(This used to be commit 82b8f749a3)
2002-11-12 23:15:52 +00:00
Gerald Carter
b0f9f11f5f fix for CR 601. Only call addprinter command when the port, driver, comment, or location field changed
(This used to be commit c6d45216f6)
2002-11-11 22:05:05 +00:00
Jeremy Allison
7f94064e4a First cut of fix for changenotify on a print server handle. Use the connections tdb
with an snum of -1 and a special printername.
Jeremy.
(This used to be commit 940b04ddfa)
2002-11-10 22:24:10 +00:00
Gerald Carter
4be3750d8e deldriver fix
(This used to be commit f20de1f9b0)
2002-11-09 14:48:27 +00:00
Gerald Carter
b3f55b37a0 re-enable ffpcn on print server handle
(This used to be commit e87829b494)
2002-11-09 05:41:27 +00:00
Andrew Bartlett
aa208a58e2 Make it easier to track things down here - add some debugs on failure.
(This used to be commit 62ee7b7dc0)
2002-11-08 22:14:31 +00:00
Jeremy Allison
47955b2f6c Merge of scalable printing code fix... Needs testing.
Also tidied up some of Richard's code (I don't think he uses the compiler
flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like
I do :-) :-).
Jeremy.
(This used to be commit 10024ed06e)
2002-11-07 02:38:42 +00:00
Gerald Carter
71f34ddabd PURGE_PRINTER fix from APP_HEAD
(This used to be commit 8af12875b0)
2002-10-25 22:17:29 +00:00
Jeremy Allison
158ae87aa9 Reverted a fix from Volker (sorry). We need to move this fix to the correct
place.
Jeremy.
(This used to be commit e46e38beab)
2002-10-23 22:23:39 +00:00
Jeremy Allison
b064077145 Debug level 12 is a typo.
Jeremy.
(This used to be commit 4d9b205362)
2002-10-23 01:55:40 +00:00
Jeremy Allison
7689a9c969 First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.
This is not 100% the same as what SuSE shipped in their Samba, there is
a crash bug fix, a race condition fix, and a few logic changes I'd like to
discuss with Andreas. Added Andreas to (C) notices for posix_acls.c
Jeremy.
(This used to be commit a81d700ae9)
2002-10-23 01:22:45 +00:00
Jeremy Allison
9b323a3c0d Fix for systems that allow more than 65536 open files per process.
Jeremy.
(This used to be commit ff537f10a0)
2002-10-22 22:17:06 +00:00
Volker Lendecke
c7731c988e Same segfault as in add_groupmem.
Volker
(This used to be commit 1f702dcd2c)
2002-10-21 20:33:00 +00:00
Volker Lendecke
5dbf435408 This moves the group mapping API into the passdb backend.
Currently this calls back to mapping.c, but we have the framework
to get the information into LDAP and the passdb.tdb (should we? I
think so..).

This has received moderate testing with net rpc vampire and
usrmgr. I found the add_groupmem segfault in add_aliasmem as
well, but that will be another checkin.

Volker
(This used to be commit f30095852f)
2002-10-21 19:28:56 +00:00
Volker Lendecke
605ab78401 Fix full_name for info23 as well. Thanks, Andrew.
Volker
(This used to be commit 382c444225)
2002-10-19 08:09:28 +00:00
Volker Lendecke
0c35d78632 This fixes some bugs for NT4 usrmgr.exe
Volker
(This used to be commit 32d6bcf3ac)
2002-10-19 07:50:48 +00:00
Gerald Carter
a0fbdc3d64 fix from APP_HEAD to commit a re-init'd printer to disk
(This used to be commit 64a1591444)
2002-10-16 18:21:55 +00:00
Gerald Carter
30acf331a9 merge from app_head to use GMT in job submission notification
(This used to be commit b130c681d2)
2002-10-15 00:28:04 +00:00
Andrew Bartlett
4ac9ccfde4 Nice *big* patch from metze.
The actual design change is relitivly small however:

It all goes back to jerry's 'BOOL store', added to many of the elements in a
SAM_ACCOUNT.  This ensured that smb.conf defaults did not get 'fixed' into
ldap.  This was a great win for admins, and this patch follows in the same way.

This patch extends the concept - we don't store values back into LDAP unless
they have been changed.  So if we read a value, but don't update it, or we
read a value, find it's not there and use a default, we will not update
ldap with that value.  This reduced clutter in our LDAP DB, and makes it
easier to change defaults later on.

Metze's particular problem was that when we 'write back' an unchanged value,
we would clear any muliple values in that feild.  Now he can still have his
mulitivalued 'uid' feild, without Samba changing it for *every* other
operation.

This also applies to many other attributes, and helps to eliminate a nasty
race condition.  (Time between get and set)

This patch is big, and needs more testing, but metze has tested usrmgr, and
I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly
flawed ;-).

The same system will be introduced into the SAM code shortly, but this fixes
bugs that people were coming across in production uses of Samba 3.0/HEAD, hence
it's inclusion here.

Andrew Bartlett
(This used to be commit 7f237bde21)
2002-10-12 03:38:07 +00:00
Gerald Carter
a92bf85234 print job properties fix from APP_HEAD. a null devmode is not a failure.
(This used to be commit b507dba452)
2002-10-09 18:54:20 +00:00
Gerald Carter
01da7d5617 add_printer_hook() fix from APP_HEAD
(This used to be commit 94201672a5)
2002-10-09 17:00:04 +00:00
Gerald Carter
876afb5d0f merge from APP_HEAD
* s/driverlocation/comment
* detect native mode domain and enumerate local groups

Also

* Added sendfile stats from SAMBA_2_2
(This used to be commit 764b58e2c0)
2002-10-08 18:29:57 +00:00