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

701 Commits

Author SHA1 Message Date
Jean-François Micouleau
3ab4521536 re-done all of samr_query_disp_info()
instead of enumerating the whole user db or group db every time, we store
a in memory copy linked to the handle.

that's much faster for large enumeration where the db can't fit in a
single rpc packet. And as it's a copy, it's constant between enumeration.

still some stuff to clean. But now I can fix the W95 userlist bug, as I've
finally found it.

	J.F.
0001-01-01 00:00:00 +00:00
Gerald Carter
72d3b16022 merge from 2.2 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
589aa4fe22 added info level 1 to samr_query_alias() 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
49764852c5 fixing bug I introduced.
J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
a217c4e4ff there is no unknown field in LSA_SEC_QOS
some cleanup of the lsa_open_policy and lsa_open_policy2 parser. the
length fields are not correct but that's what NT send. We don't anymore
underflow or overflow the decoding.

added the domain admins group to the default SD.

we are now checking the desired access flag in the lsa_open_policy_X()
calls and in most functions also.

        J.F.
0001-01-01 00:00:00 +00:00
Tim Potter
b596c0b171 Replaced some hardcoded hex numbers with constants.
Made a note about NOTIFY_OPTION_TYPE and NOTIFY_OPTION_TYPE_DATA - they are
actually one structure.  The latter is just the deferred referrant of the
former.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
c99bc30559 update the ldap support code. it compiles.
Ignacio you can update your howto ;-)

samsync: a small patch to try chaning challenges.

	J.F.
0001-01-01 00:00:00 +00:00
Gerald Carter
5b4b3323a3 merge from 2.2 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
8d359e6213 decoded SAM_DELTA 0x0e and 0x12.
One is an entry for the trusted domains
The other is an entry for the trusting domains

They are pretty basic, I'll improve them.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
314b675ed9 a ugly decoder for SAM_DELTA_DOM_INFO (0x0d)
a correct decoder for SAM_PRIVS_INFO (0x10)

this code is totally useless right now, it's just fun to decode those and
will save tpot some time.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
0a727afc66 added info level 3 to samrgetgroupinfo. I don't know what the value is.
It's just to keep usermanager happy ;-)

clean up a bit samr_query_aliasinfo to return the group description

added: samr_del_aliasmem, samr_del_groupmem and samr_del_domuser

with the correct scripts, you can now entirely manage the users from
usermanager ! Closer to full PDC every day ;-)

        J.F.
0001-01-01 00:00:00 +00:00
Tim Potter
bef4365647 Added client and server code for the GetPrintProcessorDirectory SPOOLSS
rpc.  This was supposed to fix a printer driver download bug but it didn't
but it seemed a shame to trash all this code so I'm commiting it #ifdef'ed
out in case someone needs it one day.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
fef52c4b96 again an intrusive patch:
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the
definition of standard_sub_basic() to cope with that.

- removed the smb.conf: 'domain admin group' and 'domain guest group'
parameters ! We're not playing anymore with the user's group RIDs !

- in get_domain_user_groups(), if the user's gid is a group, put it first
in the group RID list.

I just have to write an HOWTO now ;-)

        J.F.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
575897e879 OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
64bf8f81c4 Const religion for some of the RPC code. 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
bc28a8eebd added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
359ca8f246 const religion 0001-01-01 00:00:00 +00:00
Tim Potter
9712d3f15a Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
3f0a9ef2b8 Changed again how the privilege list is handled in the group mapping code.
This time it's a PRIVILEGE_SET struct instead of a simple uint32 array. It
makes much more sense. Also added a uint32 systemaccount to the GROUP_MAP
struct as some privilege showing in USRMGR.EXE are not real privs but a
bitmask flag. I guess it's an heritage from NT 3.0 ! I could setup an NT
3.1 box to verify, but I'm too lazy (yes I still have my CDs).

Added 3 more LSA calls: SetSystemAccount, AddPrivileges and
RemovePrivileges, we can manage all this privilege from UserManager.

Time to change the NT_USER_TOKEN struct and add checks in all the rpc
functions. Fun, fun, fun.

        J.F.
0001-01-01 00:00:00 +00:00
Gerald Carter
c60aa6c06f merge from APPLIANCE_HEAD 0001-01-01 00:00:00 +00:00
Herb Lewis
5f625f2877 add .po32 files to ignore list 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
99471d2569 added samr_set_domain_info and samr_unknown_2E.
We now get the full account policy window in usermanager, and the
framework to store all those values. I plan to add a TDB file to store
them.

oh, and found that the last value in a sam_unknown_info_12_inf struct is
an uint16 and not a uint32.

andrewb: you hardcoded the MAX_PASSWORD_AGE to 21 days. We can now turn it
to a value setable in usermanager.

        J.F.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3f1cfb62e8 Fix ./configure --enable-developer warnings (shadow of global) 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
1748d5a2af added lsaenumprivsaccount and lsalookupprivvalue to rpcclient
and more to come ...

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
f29774e589 Changed how the privileges are stored in the group mapping code. It's now
an array of uint32. That's not perfect but that's better.

Added more privileges too.

Changed the local_lookup_rid/name functions in passdb.c to check if the
group is mapped. Makes the LSA rpc calls return correct groups

Corrected the return code in the LSA server code enum_sids.

Only enumerate well known aliases if they are mapped to real unix groups.
Won't confuse user seeing groups not available.

Added a short/long view to smbgroupedit.

now decoding rpc calls to add/remove privileges to sid.

        J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
646651018a added lsa_enum_sids to rpcclient
fixed lsa_enum_rpivs server code. This time it works as W2K.
fixed smbgroupedit to compile and work.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
84035ae72f add another command to rpcclient: getdispname. Show the full description
of a privilege.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
fa63cb78e3 add a command to rpcclient: enumprivs
J.F.
0001-01-01 00:00:00 +00:00
Gerald Carter
90ed3d47e1 remove unused variables 0001-01-01 00:00:00 +00:00
Gerald Carter
96b3a65a73 merge from 2.2 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
bfbe7f377e samr_querydom_info level 1: found the meaning of the unknow fields. And
discovered that our reply is short by 4 bytes since day 1 of this code.

Added a decode function to rpcclient too.

splitted the STRING2 fields filling while trying to understand the win9x
userlist bug. (didn't fix the bug, but the reply looks closer to NT).

        J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
9148bb9eaa Tidyups when I was doing the big merge...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
9c8439f25b Tidyups and things I discovered during the merge...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
be7323163b No longer used.
Jeremy.
0001-01-01 00:00:00 +00:00
Martin Pool
5c892badbc Doxygen demo for Tim. 0001-01-01 00:00:00 +00:00
Martin Pool
be5d32eb9c spoolss_io_devmode private data is binary and should be shown in hex,
not ascii.
0001-01-01 00:00:00 +00:00
Tim Potter
87614c74b3 Wrote some stubs for new win2k only spoolss rpc commands:
GetPrinterDataEx() and SetPrinterDataEx().  Not sure what the command
number is for the latter is - I haven't seen it on the wire yet.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
fd3a657b44 get the string lengths right in domain logons
Andrew, this fixes domain logons in head. Please look at the change,
as I think you may have misunderstood the max_str_len field (which is
badly named)
0001-01-01 00:00:00 +00:00
Andrew Bartlett
514c91b16b Various post AuthRewrite cleanups, fixups and tidyups.
Zero out some of the plaintext passwords for paranoia

Fix up some of the other passdb backends with the change to *uid_t rather than
uid_t.

Make some of the code in srv_netlog_nt.c clearer, is passing an array around,
so pass its lenght in is definition, not as a seperate paramater.

Use sizeof() rather than magic numbers, it makes things easier to read.

Cope with a PAM authenticated user who is not in /etc/passwd - currently by
saying NO_SUCH_USER, but this can change in future.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f70fb819b2 This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
	- Fully malloc'ed structures.
	  - Massive rework of the code so that all structures are made and destroyed
	    using malloc and free, rather than hanging around on the stack.
	- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
	   to be declared 'invalid' without the chance that people might get ROOT by
	   default.

	- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
	  appropriate place (probably domain_client_validate.c) in the future. They
	  don't belong in session setups.

	- Massive introduction of DATA_BLOB structures, particularly for passwords.

	- Use NTLMSSP flags to tell the backend what its getting, rather than magic
	  lenghths.

	- Fix winbind back up again, but tpot is redoing this soon anyway.

	- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
0f6207f455 This one's a doozy. A cut&paste bug incorrectly sets the max string length
of the lm challenge/response header in the NET_ID_INFO_2 structure included
in a network logon request.  It seems Windows 2000 is the only OS that
cares about this.
0001-01-01 00:00:00 +00:00
Tim Potter
b496936634 Removed confusing comment. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
c95f5aeb93 This commit is number 4 of 4.
In particular this commit focuses on:

Actually adding the 'const' to the passdb interface, and the flow-on changes.

Also kill off the 'disp_info' stuff, as its no longer used.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes introduces a large dose of 'const' to the Samba tree.
There are a number of good reasons to do this:

	- I want to allow the SAM_ACCOUNT structure to move from wasteful
	pstrings and fstrings to  allocated strings.  We can't do that if
	people are modifying these outputs, as they may well make
	assumptions about getting pstrings and fstrings

	- I want --with-pam_smbpass to compile with a slightly sane
	volume of warnings, currently its  pretty bad, even in 2.2
	where is compiles at all.

	- Tridge assures me that he no longer opposes 'const religion'
	based on the ability to  #define const the problem away.

	- Changed Get_Pwnam(x,y) into two variants (so that the const
	parameter can work correctly): - Get_Pwnam(const x) and
	Get_Pwnam_Modify(x).

	- Reworked smbd/chgpasswd.c to work with these mods, passing
	around a 'struct passwd' rather  than the modified username

---

This finishes this line of commits off, your tree should now compile again :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
94403d8417 Fixed the bug with member servers in a Samba PDC hosted domain not allowing
other access. Problem was max time was being set to 0xffffffff, instead of
0x7fffffff.
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
Andrew Bartlett
d1bc778301 These are RIDs not Unix UIDs so make this clear in the feild names.
Andrew Bartlett
0001-01-01 00:00:00 +00:00
Simo Sorce
94b0fde8a8 move to SAFE_FREE() 0001-01-01 00:00:00 +00:00
Tim Potter
3245714243 Merge prs_hash1() function from tng. 0001-01-01 00:00:00 +00:00
Tim Potter
0f041597f8 Decode 68-byte password blocks using sam replication password key (which
is actually the user session key).
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b8651acb9c - enable MSDFS by default, there seems no reason not to have it enabled
by default in Samba 3.x

- got rid of some unused parameters in Makefile.in

- declare DEBUGLEVEL in debug.h rather than in each file
0001-01-01 00:00:00 +00:00
Andrew Tridgell
5bb7e4f0f6 it now all compiles - so try enabling it by default and see what explodes on the build farm 0001-01-01 00:00:00 +00:00
Tim Potter
eecdba2b01 Welcome to tpot's exploit world!
- put in checks for return values in rpc parsing routines

- replace a bunch of stupid &(foo->bar) with &foo->bar

- fixed bug in net_io_sam_alias_mem_info where there are zero members in
the alias
0001-01-01 00:00:00 +00:00
Andrew Tridgell
dcd6e735f7 the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work 0001-01-01 00:00:00 +00:00
Andrew Bartlett
af53e774d7 Fix up some compile issues. We can't have C99 comments and add a smattering
of const.
0001-01-01 00:00:00 +00:00
Tim Potter
3a60cb44f2 Merge of sam sync code from TNG.
Reverse-engineered the sam replication protocol from staring at hex dumps
for a while.  It's pretty similar to the sam sync protocol with a couple of
different delta header types.

I wasn't able to figure out the format of the privilege stuff - needs more
time and a whiteboard.  (-:

The impressive bit is that the sam sync stuff from tng basically just
worked thanks mainly to Luke Leighton's efforts in this area.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS 0001-01-01 00:00:00 +00:00
Jeremy Allison
0f5b187387 Fixed malloc -> talloc problems pointed out by Simo.
Jeremy
0001-01-01 00:00:00 +00:00
Gerald Carter
fe4ffa8dda merge from 2.2 0001-01-01 00:00:00 +00:00
Simo Sorce
fa8e55b8b4 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
0001-01-01 00:00:00 +00:00
Jeremy Allison
a3781ad38f Merge in the NT drivers changes from 2.2.
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
fd54412ce9 - avoid possible mem leaks in rpcclient/cmd_*.c (talloc_destroy not performed)
- ported two rpc back from TNG (WINREG: shutdown and abort shutdown)
- some optimizations and changed some DEBUG statement in loadparm.c
- changed rpcclient a bit moved from non reentrant next_token_nr to next_token
- in cmd_reg.c not sure if getopt will work ok on all platforms only setting optind=0
0001-01-01 00:00:00 +00:00
Tim Potter
ce22267ec8 A collection of fixes/cleanups to the security descriptor code by
matt_zinkevicius@hp.com
0001-01-01 00:00:00 +00:00
Andrew Bartlett
b30b6202f3 This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.

The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards.  The
interface currently implemented in as

nt_status = check_password(user_info, server_info)

where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.

The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.

This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing.  We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.

Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree.  (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
0001-01-01 00:00:00 +00:00
Tim Potter
c9cbe3237e Fix for smbpasswd set_userinfo24 was in the wrong place! 0001-01-01 00:00:00 +00:00
Jeremy Allison
c51cfc7f0d Allow smbpasswd to join a W2K hosted AD domain.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
2e33940360 Held a shoot-out between NT_STATUS_NO_PROBLEMO and NT_STATUS_NOPROBLEMO.
According to the incorruptible judges find and grep, the latter won.

Mmm - procrastination.  (-:
0001-01-01 00:00:00 +00:00
Andrew Bartlett
bd3c2a0cdd This backs out my last change, which broke some of the finer points of RPC
coding :-).  I'll be more carfull in this area in future.

This does not back out the cli_login change, so domain logons still work, but
only for english.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
cf1d1cd9d6 This fixes security=domain, which has been broke since the big charset
changeover.  For my own sainity I have created a new function to fill out both
the header and buffer for a string in an RPC struct.  This DOES NOT take a
length argument, only the actual string to be placed.

The RPC code is currently littered with code that does init_uni_hdr() followed
immidiatly by init_unistr2(), and often the length argument is wrong.  (It was
for the code I changed, even before the charset stuff).  Another bug where we
made strings AT LEAST MAX_UNICODE_LEN long hid this bug.

This works for loopback connections to Samba, and can't be any more broke than
it was before :-).  (We had double and revese conversions, fun...).

In particular this makes us multibyte complient.

In any case, if there are no objections I will slowly convert other bits of
code to the same system.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
3056357cd8 implement:
LSA_ENUM_PRIVS
	LSA_PRIV_GET_DISPNAME
	LSA_ENUM_ACCOUNTS
	LSA_OPENACCOUNT
	LSA_ENUMPRIVSACCOUNT
	LSA_GETSYSTEMACCOUNT

It's a work in progress. nobody should expect it to work

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
3f14dda2a2 add query user info level 20 (for RAS)
add query dominfo level 5
some cleanup, don't free talloced memory.
implement delete domain and local groups.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
a8006e6f3e when converting ascii to unicode, if the ascii string is NULL, don't
convert it, rpcstr_push doesn't like it.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5059fbbb76 Added JF's fix for max_entries being 0.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1685e41da0 Missing prs_align() was causing Win9x nexus tools to fail. security_info_sent
was being miss-parsed.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d4872c94c2 Fixed auto-alloc of dispinfo code when unmarshalling.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
7079300da6 Added LsaGetConnectedCredentials patch from Manoj Naik <manoj@almaden.ibm.com>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
001e9b7b54 From JF....
hi jeremy,

can you commit the following patch against HEAD. I can't do it right now

Thanks Tim for me. He changed the SAM_DISPINFO_1 array without checking if
he didn't break the server code. And he did.

So on my way I cleaned info_1, 2, .. 5

it may break winbind. I leave to tim the pleasure to fix it ;-)

        jf.

I added some talloc changes and checks for alloc fails.

Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
008628fb8a Removed another silly static array. 0001-01-01 00:00:00 +00:00
Herb Lewis
45bf995bf6 SGI compiler fixes.
Jeremy
0001-01-01 00:00:00 +00:00
Jeremy Allison
274c0f5028 Ensure we always have a valid pointer on unmarshalling an SD with zero
ace entries.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
89eaaafe7d Fixed bug introduced by changeover of security descriptor code from
malloc() to talloc().  Previously, creating an ACL containing zero ACEs
would return a non-NULL pointer to zero bytes of memory.  The talloc() code
would return a NULL pointer making the ACL a NULL ACL instead of an empty
one.  The difference is a NULL ACL allows all access and an empty ACL
denies all access.

We solve this by calling talloc(ctx, sizeof(SEC_ACE) * num_aces + 1).
Heh.
0001-01-01 00:00:00 +00:00
Tim Potter
d936ffedd9 Cosmetic fixups found while playing with the server manager. Added support
for NET_SRV_SET_INFO rpc call which is made when double-clicking on a
computer in the server manager and changing the description.  We always
return NT_STATUS_NOPROBLEMO as NT doesn't seem to decode any error messages
passed back.

Maybe the changed comment string could be stored in a tdb and regurgitated
instead of the "server string" smb.conf parameter?
0001-01-01 00:00:00 +00:00
Gerald Carter
3ab50e648d sync this function with 2.2 (single check for NULL parameter) 0001-01-01 00:00:00 +00:00
Jeremy Allison
54ea00fa87 Removed unused (and potentially crash-causing) free function.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6b4a70cd82 Merging Gerry's spoolss changes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
05a2911403 Fixed W2K SP2 joining a Samba PDC hosted domain.
Jermey.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0fe11c329f INFO_24 sometimes has a 2 byte length, sometimes doesn't. Safer to not
depend on it...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5690ec77c8 Modified version of Jim's 0x27 and 0x28 Win9x Secdesc patch.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
bc366f3153 Jim McDonough's parse patches for Win9x get SD calls.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
a600c96e59 Fixed typo spotted by "Jim McDonough" <jmcd@us.ibm.com>....
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
d2eafa7483 Add password length field to SAM_USER_INFO24 structure and fix init
and parse function.
0001-01-01 00:00:00 +00:00
Tim Potter
13df2304b3 Added some msdfs client routines. 0001-01-01 00:00:00 +00:00
Tim Potter
35d2794114 Converted init_samr_q_lookup_names() and samr_io_q_lookup_names()
to use tallocated memory instead of dodgy static arrays.
0001-01-01 00:00:00 +00:00
Tim Potter
870e9e4e89 Added *.po to .cvsignore files. 0001-01-01 00:00:00 +00:00
Tim Potter
8ba30031a4 Added a init function for net_q_logon_ctrl2 so we can make this call
from rpcclient.

Added init and i/o functions for net_{q,r}_logon_ctrl functions so we
can call from rpcclient and respond to this call from smbd.
0001-01-01 00:00:00 +00:00
Gerald Carter
09506ac0e6 merge from 2.2 DeletePrinterDriver() server side stud coming
in separate commit after I get it working in 2.2.
0001-01-01 00:00:00 +00:00
Tim Potter
5bbd946d59 Reverted samr_io_userinfo_ctr() patch because it broke too much other
stuff.  (-:
0001-01-01 00:00:00 +00:00
Tim Potter
fc44cec0de So the samr_io_userinfo_ctr was requiring a SAM_USERINFO_CTR to be passed
in as well as tallocating space for one itself.  I've deleted code so the
passed in container is used to store the SAM user info.  This may have
broken some server side SAM stuff which probably isn't used anyway.  )-:
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
62a7a567fd fixes to the group mapping code.
Not ready yet.

	J.F.
0001-01-01 00:00:00 +00:00
Tim Potter
a8c49d1e60 Fixed typo in comment. 0001-01-01 00:00:00 +00:00
Tim Potter
139e767e78 iinit_samr_q_lookup_rids() didn't actually copy the rids into the
parse structure.
0001-01-01 00:00:00 +00:00
Tim Potter
d384cae570 Renamed unknown field to access mask in open alias parsing functions. 0001-01-01 00:00:00 +00:00
Jeremy Allison
9b3dd80176 Added code from "Nigel Williams" <nigel@veritas.com> (yes, the same famous
Nigel Williams who did NIS/GINA !) to implement add/modify/delete shares
for Win2k. Needs testing as I made a few mods to the original code.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
0feaac00a1 few cleanups to bring in line with 2.2 0001-01-01 00:00:00 +00:00
Gerald Carter
0a6ceed279 rpcclient merge from 2.2 (including Jeremy's non-void return fix) 0001-01-01 00:00:00 +00:00
Jeremy Allison
f4f4aae675 Added Herb's comment fix.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6248fb2292 Fix "proc num out of range" error. Missing rpc call.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
04976c32f3 Set SD's for share. Added level 1501. Map GENERIC file bits to specific bits.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3512ba1f65 Implemented stub function for NET_SHARE_DELETE. Now to implement the real
internals to support server manager.
Jeremy
0001-01-01 00:00:00 +00:00
Jeremy Allison
a2cd5f2ba1 Added stub function for NET_SHARE_ADD. Once this is implemented to call a hook
function (same for NET_SHARE_DELETE and NET_SHARE_SET) we will be able to manage
the shares section in smb.conf via NT server manager........
This should enhance the friendliness of Samba in NT-only shops by an order of
magnitude.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3bfd155ba7 I know we're supposed to be feature frozen, but I couldn't resist this... :-).
I worked out and added the per-share get/set RPCs for security descriptors.
Currently this code returns Everyone, full access on get and permission denied
on set, but backending this with a tdb and checking it on tconX (to give full NT
semantics for security on shares) is now an excersise for the reader... :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
887ef3e12d include/ntdomain.h:
rpc_server/srv_lsa_hnd.c: Remove back pointer from policy handle list as the pipe
						that opened the handle may have been closed. We were dereferencing
						into something that had been closed.
rpc_parse/parse_spoolss.c: Sync up with Gerald's changes in 2.2.
lib/replace.c: Don't do proto on setlinebuf as it differs between systems.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
13765eca71 configure configure.in include/config.h.in lib/replace.c: Added test and replacement
for setlinebuf which apparantly doesn't exist on HPUX 11.
include/byteorder.h:
rpc_parse/parse_prs.c:
Ding Dong the witch is dead ! :-). Ok, I'm happy 'cos I've finally deleted
all the *HORRIBLE* DBG_RW_XXX and RW_XXX macros from include/byteorder.h.
They were macros that included macros that had conditional macros included.
No one understood them (they were the cause of most of the bigendian issue
bugs). Finally, I went into parse_prs.c and inlined all of that stuff with
regular function calls. They're understandable, they're easy to edit and
they don't include macros !
JF - please look at the one comment I added (JF PLEASE CHECK). I have
tested this partly with IRIX (a bigendian system) running with AS/U on
a Solaris box in SGI's lab, and I've also confirmed these new changes
work with W2K (vmware) but there may be the odd bug lurking. Herb, if
you could re-checkout and test again with this code that would help.

Extra.  Fixed bug spotted by the sharp eyes of JF - big endian unicode
packet would cause a early truncate of string parsing as we were checking for a char *
0, not a uint16 * 0.

Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
ea963a648b rename of 16 new_smb_io functions to smb_io_* for consistency sake
(merge from 2.2)
0001-01-01 00:00:00 +00:00
Gerald Carter
817258f117 merge from 2.2. 0001-01-01 00:00:00 +00:00
Gerald Carter
fd6bfe03f4 reverted the rename of new_spoolss_io_r_enumprinterdrivers() 0001-01-01 00:00:00 +00:00
Jeremy Allison
c0345bbaed Added Michael Sweet's CUPS patch to call directly into the CUPS backend.
Parameterises the printing functions so other backends can be plugged
directly in (this is a good thing :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
f37ba49c28 whoops...forgot one 0001-01-01 00:00:00 +00:00
Gerald Carter
cbce0c9350 renamed one of the enumprinterdrivers parsing functions
for consistency sake.
0001-01-01 00:00:00 +00:00
Jeremy Allison
500c7bc0fe rpc_parse/parse_samr.c: Removed unneeded deubg.
rpc_server/srv_netlog_nt.c: Ensure we marshall a bad password return correctly
to a w2k client.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
017a6a9868 We were mismarshalling a netlogon reply for bad password to W2K.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0185f8159d We copy the RPC header directly from the incoming client - remember to
set little-endian flag on marshalling. AS/U now correctly tries to join
our domain !
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d23b9be1ba No longer used...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0cd37c831d Serious (and I *mean* serious) attempt to fix little/bigendian RPC issues.
We were reading the endainness in the RPC header and then never propagating
it to the internal parse_structs used to parse the data.
Also removed the "align" argument to prs_init as it was *always* set to
4, and if needed can be set differently on a case by case basis.
Now ready for AS/U testing when Herb gets it set up :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0e6a34510e Sync up handle creation with 2.2 branch. We can now join AS/U domains and
authenticate against them. Big/little endian issues fixed.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c3a1904564 Merged JF's fixes into HEAD. These are for string parsing and SAMR fixes.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1552db715d rpc_parse/parse_spoolss.c: Fixed memory leak introduced by restructuring.
rpc_server/srv_spoolss_nt.c: Fixed problem with printer snum being read uninitialised.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3495d5cc3b Remove unused code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
14d5997dc8 Move to talloc control of SPOOL_XXX structs. Move to talloc control of
security descriptors and pointers. Syncup with 2.2 tree.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d3a56c6042 Added total memory allocated counter to talloc, so we can tell if a talloc
pool is getting bloated. Also added a talloc_zero function to return zeroed memory.
Added debug in rpc_server/srv_pipe_hnd.c so we know when a talloc pool is being
freed. Syncup with srv_pipe_hnd.c from 2.2 so we are freeing memory at the same time.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
94fdffb355 As prs_alloc_mem now zeros memory, remove superfluous memsets after it.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c9a6a17025 Separated dfs pipe into implementation and interface modules.
rpc_parse/parse_dfs.c: Had to add buffer overrun checking ! HOW DID THIS GET IN HERE !
rpc_parse/parse_prs.c: Ensure prs_alloc_mem does a memset of zero before returning.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e14c88ddf4 Split srvsvc pipe into interface and implementation modules.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f434cda977 Started conversion of lsa server code to canonical format (as srv_reg and
srv_samr have been).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
bda1d6d4a4 This patch (donated by Marc Jacobsen of HP) should make Sun and HP very happy :-).
Probably Veritas too... :-).
It allows Samba as a domain member to authenticate against an AS/U server such
as the older HP PDC product or PD Netlink. It does this by trying a netlogon
with info level 3 and then falling back to info level 2 if the PDC returns
invalid info level.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e7108a18b2 but it is needed for linking ... 0001-01-01 00:00:00 +00:00
Jeremy Allison
41d46a495b Fixup missing tests on code imported from tng.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c0517d6f4e Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
5b38513cef Fixed duplicate free_sec_acl() call in free_sec_desc() function.
From "Richard Bollinger" <rabollinger@home.com>
0001-01-01 00:00:00 +00:00
David O'Neill
f24aa0b51f Changes from SAMBA_2_2:
- fix typo in cast from talloc
0001-01-01 00:00:00 +00:00
Jeremy Allison
f76dc952f7 Fixed "object picker can't determine if object in domain" bug seen from W2K
clients. Did this by importing Samba-TNG code that correctly handles LSA
lookups.
*MANY* thanks to Luke, Sander, Elrond and the rest of the TNG gang !
Jeremy
0001-01-01 00:00:00 +00:00
David O'Neill
7853b27bc1 Changes from APPLIANCE_HEAD:
source/include/proto.h
    source/include/rpc_spoolss.h
    source/rpc_parse/parse_spoolss.c
    source/rpc_server/srv_spoolss.c
    source/rpc_server/srv_spoolss_nt.c
        - speedups in printer queue enumeration  - still room for
          improvement.  The construct_dev_mode() still creates and destroys
          a printer info_2 structure every time it is called.
        - fixed job->devmode memory leak
        - converted printer job notification routines to use tallocated
          memory rather than a fixed 2K buffer.   This reduces the memory
          requirements of a 4500 job queue enumeration from 90MB to about
          16MB.
0001-01-01 00:00:00 +00:00
David O'Neill
59229b9025 Changes from APPLIANCE_HEAD:
source/rpc_parse/parse_lsa.c
        - off by one unistr length bug in init_lsa_trans_name()

    source/lib/util_sid.c
        - resolve more BUILTIN sid values to names.

    source/nsswitch/wb_client.c
        - fix typo in debug message
        - set errno on error so we don't get bogus value from last failure.

    source/rpc_server/srv_spoolss_nt.c
        - add debug to track number of open printer handles for ease of
          tracking handle leaks in the future.

    source/rpc_server/srv_lsa.c
        - fix off-by-one string bug.  This was preventing NT from
          displaying names for well-know SIDs in printer permissions
          dialog.
0001-01-01 00:00:00 +00:00
Tim Potter
a125eba0aa Printer name unistr is null terminated in make_spoolss_q_open_printer_ex() 0001-01-01 00:00:00 +00:00
Tim Potter
793153ebde RPC server fixes for RPC client changes merged from TNG. 0001-01-01 00:00:00 +00:00
Tim Potter
c292f4aa31 General clean up. Merge of access_mask fixes for some unknown fields from
tng.
0001-01-01 00:00:00 +00:00
Tim Potter
54b34517ce General clean up. Merged routines for parsing enum_trust_dom rpc call. 0001-01-01 00:00:00 +00:00
David O'Neill
376601d17d Changes from APPLIANCE_HEAD:
testsuite/printing/psec.c
        - Use lock directory from smb.conf parameter when peeking at the
          ntdrivers.tdb file.
    source/rpc_parse/parse_sec.c
        - fix typo in debug message
    source/script/installbin.sh
        - create private directory as part of 'make install'.
    source/nsswitch/winbindd_cache.c
    source/nsswitch/winbindd_idmap.c
    source/passdb/secrets.c
    source/smbd/connection.c
        - always convert tdb key to unix code-page when generating.
    source/printing/nt_printing.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend path to a filename that is NULL in
          add_a_printer_driver_3().
    source/rpc_server/srv_spoolss_nt.c
        - always convert tdb key to unix code-page when generating.
        - don't prepend server name to a path/filename that is NULL in the
          fill_printer_driver_info functions.
    source/printing/printing.c
        - always convert tdb key to unix code-page when generating.
        - move access check for print_queue_purge() outside of job delete
          loop.
    source/smbd/unix_acls.c
        - fix for setting ACLs (this got missed earlier)
    source/lib/messages.c
        - trivial sync with appliance_head
0001-01-01 00:00:00 +00:00
Jeremy Allison
e0931cda80 Cast prs_alloc_mem to correct type.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
26f873540c Merged Tim's fixes from appliance-head.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ce4f461965 Never free anything in the rpc_parse/prs_XXX functions. Do it in the enclosing
function.
lib/util_unistr.c: Check lengths *before* reading source - prevent uninitialised
memory reads.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
506b5e34c3 Added lock backouts on fail.
When chaining together long lines of bloody "if" statements, which should
logically be separated, and one of them allocates memory, remember to
*free* it *WHETHER OR NOT THE IF STATEMENTS SUCCEEDED* !!!!
Yes I do consider this a bug in the coding style of Tridge, Rusty, Tim et al. :-).
I'm just pissed 'cos this took 4 hours to track down even with an insure error report
stating me in the face and also Ben Woodward looking over the code with me :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
69fe739303 lib/util_unistr.c:
rewrote unistr2_to_ascii() to correct a bug seen on SGI boxes.

rpc_parse/parse_misc.c:
rpc_parse/parse_prs.c:
        rewrote of BUFFER5 handling to NOT byteswap when it was already in
        network byte order.

rpc_parse/parse_samr.c:
        cleanup of samr_io_q_lookup_domain(), remove the over-parsing by 2
        bytes.

rpc_server/srv_lsa.c:
        UNISTR2 strings need to be NULL terminated to pleased W2K.

rpc_server/srv_spoolss_nt.c:
        use snprintf instead of safe_strcpy as we want the string
        truncated at 32 chars.


That should fix SUN and SGI box not able to act as printserver and the
problem with joining from a W2K wks.

        J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0a40bc83e1 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
0001-01-01 00:00:00 +00:00
David O'Neill
505a8a2277 Changes from APPLIANCE_HEAD:
- add some debugs for comparing two security descriptors.
      (source/rpc_parse/parse_sec.c)
0001-01-01 00:00:00 +00:00
Tim Potter
1db0f31ae0 Wrong length for unistr2 in init_q_lookup_names()
Removed some more static arrays and replaced with tallocated memory
blocks.
0001-01-01 00:00:00 +00:00
Jeremy Allison
9e9c71c8b3 Merged in Tim's changes : Removed static limit of MAX_LOOKUP_SIDS in rpc server and client
lsa_lookup_names() and lsa_lookup_sids().
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
71e5e802b7 return NULL instead of return False in char *prs_mem_get(); 0001-01-01 00:00:00 +00:00
Tim Potter
817819d0cc Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions from
TNG branch.

Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient.

This requires most samba binaries to link in another handful of object
files due to uncessary coupling between modules.  )-:
0001-01-01 00:00:00 +00:00
Andrew Tridgell
9ec4b1fa48 no longer pass the type to make_sec_desc(), instead the type is
derived from the other arguments
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
97e3b29356 alignment issues.
I hate that job ...

	J.F.
0001-01-01 00:00:00 +00:00
Gerald Carter
37a665002c o fixed logon script problems (wrong len in reply to net_sam_logon for
a few strings).  I was the one who broke it obviously.

o changed a few more defaults in the smbpasswd backend with
  respect to times.  Now the logon time becomes '0' and the
  pass_can_change_time is set ot the same as pass_last_set_time

o change Get_Pwnam() call in local_lookup_name to sys_getpwnam()
  as it did not seem necessary to try case permutations in the
  username.

  Tim,  I think this was your code, so you might want to double
  check me.


-- jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
0ab6eb01b0 ADDPRINTERDRIVER info level 6 fix - this is dynamic depending
on a field in the struct - that's why it was so hard to find.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
78a1307445 Fix for updating of print queues changed from a local box. Essentially,
this makes sure that the change messages sent to ourselves are handled
synchronously w.r.t. other smb packets incoming.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
eeab4e0290 Fix for memory leak when adding driver.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
0b92d0838e Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
98764c5df9 rpc_parse/parse_spoolss.c: Updated comment for old version of W2K.
tdb/tdbutil.c: With varargs uint16 is cast to (int).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b17e23a8ff printing/nt_printing.c: use getpwuid not smbgetpwuid. Canonicalize printernames.
printing/printing.c: Insure fix for malloc of zero.
rpc_parse/parse_misc.c: Enusre UNISTR's are zero filled.
rpc_parse/parse_spoolss.c: Correct INFO_6 - differs between pre-releases of W2K and shipping build.
rpc_server/srv_spoolss_nt.c: Canonicalize printernames.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
ae087bdf31 Merge of printer security descriptor, info level and printerdata
comparison changes from appliance branch.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3d68257850 Only use prs_uint8s on marshalling as we know we're little endian. On
unmarshalling use prs_uint16s. Yes this sucks :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c96a77957b Fixed double btyte-swap problems with bigendian architectures.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
1b86b9139e Fixes for io_q_setprinter rpc parsing. 0001-01-01 00:00:00 +00:00
Jean-François Micouleau
d8bf81553c last part of W2K support.
the trust domain list reply on netlogon pipe was wrong, interim hack until
we have full trust relationships.

changed some unistr2 to parse the ending NULL char.

added a prs_align_needed() function. much like a prs_align but with a
condition. needed for the unistr2 parsing.

	J.F.
0001-01-01 00:00:00 +00:00
Herb Lewis
bbb24daa25 changes to sync with 2.2. tree
.cvsignore              remove config.h - not in this directory
include/profile.h       profile changes
lib/messages.c          added message to return debug level
libsmb/clierror.c       cast to get rid of compiler warning
libsmb/smbencrypt.c     cast to get rid of compiler warning
profile/profile.c       add flush profile stats changes for profile struct
rpc_parse/parse_samr.c  fix for compiler warning
rpc_server/srv_samr.c   cast to get rid of compiler warning
smbd/ipc.c              profile stats
message.c               profile stats
smbd/negprot.c          profile stats
smbd/nttrans.c          profile stats
smbd/trans2.c           profile stats
utils/smbcontrol.c      new flush stats command
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
94f4024481 a netlogon enum trust query doesn't have a function_code at end.
a sam_user_info_24 doesn't have a uint16 at end
samr_create_user also creates the unix account now
samr_set_userinfo changes the password.

        J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
b655bc281f added samr_set_user_info and info_2.
cleanup of create_user
cleanup of rid/sid mix in samr. now we only have sid.

some prs_align() missing in parse_samr.c

a small debug change in srv_pipe.c

You still can't change a user's password in this commit.
Will be availble in the next one.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
83bfe94771 fixing prs_unistr2(). For the special case of an empty (but existing)
string.

	J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d131ad1ce3 Adding Herb's compile warning fixes to HEAD.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d9d3668fa3 Fixes from Herb - compiler warnings.
Jeremy.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
416be1b64f fixed samr_create_user(). we now correctly parse the query and the reply.
And we create the disabled account. That means we can create user and
trust accounts remotely !

ifdef out a return in passdb/smbpass.c. I think I didn't break any
security. Jeremy could you check if I didn't make any mistakes ???

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
0f707ac1fb samr unknown 0x32 is in fact samr create user.
so renamed and tidy up of the server function.

	J.F.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
4c63c91858 printer notify code.
It only sends notifies to one client. The broadcasting notify code will
code soon.

	J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f0aa8f9314 Some code moved back from TNG - updates to LSA stuff. Not yet used but
will be needed soon.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d666b958bc param/loadparm.c: Fix based on Damian's code to stop printer scripts getting overwritten.
rpc_parse/parse_spoolss.c: Tidyup to call function for relstring arrays.
Win2000 now does "Add Printer" successfully !!!!!

Jeremy.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
cd41d7a354 in a printer_info_6, driver version is 64 bits long and there is a 32 bit
padding before.

	J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
63a7d0fc35 Fixes from JF as I didn't understand the string array sizing code correctly.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e5d98ba9e9 Move towards getting W2k p&p to upload NT4.x drivers. Still doesn't work -
not sure why (JF - a glance at this would be appreciated). Removed code
that JF objected to with enumprinterdata. Added translations to/from
level 6 - but Win2k still not happy... hmmm...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
fb48efaf83 Implemented DELETEPRINTERDATA (tested with Gerald's Win32 progs).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2b1f66eb82 Fix for the SID history problem when using a Win2k domain controller
with security=domain. Also fixed to dynamically allocate the SIDs and GIDs.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
55ed0a9b0c Implemented GETFORM tested and working using Gerald's Win32 test progs....
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
596c21a2af Implemented DELETEFORM tested using Gerald's Win32 test code :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3d9b163655 Fixed overrun write error when using debuglevel > 50.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
6d081a9017 Implemented AbortPrinter() from Gerald's Win32 test code. Just purge all
possible printjobs from that printer (I think this is correct).
Added error code returns for print_queue_XXX() functions.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
14e534a890 yipee!
The spoolss AddJob function has an [in,out] buffer not an [in] buffer
(despite the comment in the code to the contrary). Also, we must fail
this function - not just blindly reply "no problem" as AddJob should
always fail on non-local printers.

This fixes a bug where the "print test page" failed about half the
time. I suspect it will also fix a bunch of other intermittent spoolss
bugs where the client (incorrectly) tries to use the AddJob printing
interface.
0001-01-01 00:00:00 +00:00
Gerald Carter
b64ddbd1aa added comment for my own memory purposes
jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
3b14487c7e hack for unmarshalling unistr's on machines with BIG_ENDIAN arch
I think we have a lot more of these bugs lurking (i'm fairly
confident of it).




jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
65ee5f9b6e - fixed memcpy bug in copy_unistr2()
- init_unistr2_from_unistr() does not NULL terminate
  the buffer



--jerry
0001-01-01 00:00:00 +00:00