summaryrefslogtreecommitdiffstats
path: root/source/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* oops - lock test was the wrong way aroundAndrew Tridgell1998-12-051-1/+1
|
* fixed pidfile handling to check for a lock on the file, so we can beAndrew Tridgell1998-12-051-16/+33
| | | | sure it is a samba process that is running.
* - renamed do_samr_xxx to samr_xxxLuke Leighton1998-12-042-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | - renamed do_lsa_xxx to lsa_xxx - added "enumgroups [-m]" command, enumerates groups, shows members. - added cmd_sam_add_groupmem(), need to call these in rpcclient.c - added cmd_sam_add_aliasmem(), need to call these in rpcclient.c - modified "enumaliases [-m]" command - improved "enumgroups" and "enumaliases" to display names not just RIDS/SIDs. - renamed "samr_unknown_12" to "samr_lookup_rids". - added the following client-side functions: get_samr_query_groupmem() get_samr_query_aliasmem() get_samr_query_groupinfo() samr_enum_dom_groups() samr_enum_dom_aliases() samr_add_aliasmem() samr_add_groupmem() - improved display output (display.c)
* moved get_unixgroups it will be needed by the unix instance of the groupLuke Leighton1998-12-031-0/+49
| | | | DB API
* jean-f spotted bug in test for existence of MACHINE.SID and SAM_NAME.SID.Luke Leighton1998-12-031-1/+1
|
* removed check on name of domain having to be right, etc etc.Luke Leighton1998-12-021-8/+0
|
* issues spotted by andrej: %s\\%s not %s\%sLuke Leighton1998-12-021-2/+2
|
* string_to_sid was using next_token() this is bad as it stops you fromLuke Leighton1998-12-021-43/+44
| | | | | being able to use next_token() outside of string_to_sid calls. use strchr instead
* fixing smbpasswd to link to smbd to obtain domain sidLuke Leighton1998-12-012-4/+7
|
* rpc_samr.h parse_samr.c srv_samr.c :Luke Leighton1998-12-012-40/+69
| | | | | | | | | | samr_query_aliasmembers (cool!) util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c : pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5) to obtain member and pdc sids.
* fix to domain_namemap (domain, ntname wrong way round oops)Luke Leighton1998-12-013-7/+7
| | | | stupid compile errors with file_rename() call just created.
* adding some samr parsing calls (group / alias adding / deleting)Luke Leighton1998-12-013-9/+36
| | | | added code that moves MACHINE.SID to DOMAIN_NAME.SID if it exists.
* attempting to fix "domain user map" up, but it's a bit complicated.Luke Leighton1998-11-303-39/+61
| | | | | | | | | | | | | | | | | i may simply go for a response in the NetSamLogon returning the unix username, forcing the NT user to appear to be a unix user, however even that is fraught with implications. might just have to go the whole hog and do this tuple thing, "unix_name + nt_name" always associated together... issue with api_net_sam_logon, getsam21pwent() being called twice, the second time overwriting static buffer data (argh) so had to make a copy. noticed a nested "become_root()"/"unbecome_root()" which will have to be tracked down...
* - adding builtin[alias]db.Luke Leighton1998-11-303-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | - lib/sids.c: generate_sam_sid() modified to take a domain name: it now generates "DOMAIN_NAME.SID". reasons: 1) if you run multiple samba servers on the same machine under different netbios names as members of a domain, they won't all use the same SID, which is a _big_ mistake but it would happen _by default_. 2) we have (had) a problem with sid_to_string() and string_to_sid() which cause SIDs to be incorrectly read. one of the major reasons for *NOT* making this change was so as not to disrupt existing users. but as they will be anyway by this bug, we might as well go ahead. - passdb/smbpass.c: wanted to change the meaning of the name in the smbpasswd file to an "nt" name not a "unix" name. this is probably not a good idea: reverted this. - output formatting / bug-fixing in rpcclient query_useraliases code.
* "retired" two modules to preserve their cvs history.Luke Leighton1998-11-293-0/+2184
| | | | added their replacements, added sam password database API modules
* weekend work. user / group database API.Luke Leighton1998-11-292-49/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - split sam_passwd and smb_passwd into separate higher-order function tables - renamed struct smb_passwd's "smb_user" to "unix_user". added "nt_user" plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd password databases to fill in the blank entries that are not obtained from whatever password database API instance is being used. NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c for the only example outside of the password database APIs i could find. - added query_useraliases code to rpcclient. - dealt with some nasty interdependencies involving non-smbd programs and the password database API. this is still not satisfactorily resolved completelely, but it's the best i can do for now. - #ifdef'd out some password database options so that people don't mistakenly set them unless they recompile to _use_ those options. lots of debugging done, it's still not finished. the unix/NT uid/gid and user-rid/group-rid issues are better, but not perfect. the "BUILTIN" domain is still missing: users cannot be added to "BUILTIN" groups yet, as we only have an "alias" db API and a "group" db API but not "builtin-alias" db API...
* Makefile.in: Added maintainer mode fixes.Jeremy Allison1998-11-257-408/+574
| | | | | | | | | | | | | | | | | | | | | | | | aclocal.m4: Added AC_LIBTESTFUNC. configure.in: Fixed -lsecurity -lsec problems. client.c: dos_ fixes. groupdb/aliasunix.c: Dead code removal. include/includes.h: Added default PRINTCAP_NAME. lib/genrand.c: dos_ fixes. lib/replace.c: Added strtoul. lib/system.c: dos_ fixes. lib/util.c: dos_ fixes. lib/util_sid.c: Signed/unsigned fixes. lib/util_str.c: removed bad const. locking/locking_slow.c: dos_ fixes. printing/printing.c: dos_ fixes. rpc_server/srv_samr.c: Dead code removal. rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN ! smbd/dir.c: dos_ fixes. smbd/open.c: dos_ fixes. smbd/oplock.c: dos_ fixes. smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes. Jeremy.
* sorting out difference between aliases and groups in the cases whereLuke Leighton1998-11-241-1/+4
| | | | | | | | | | | | | | | unix groups are not explicitly mapped. i.e as a PDC or BDC you can have domain groups, as a member of a domain you cannot. as a member of a domain, unmapped unix groups are assumed to be aliases, and as a PDC or BDC, unmapped unix groups are assumed to be unix groups. there is _one_ other check needed with aliases to be added: unmapped unix groups that have the same name as an NT group on the PDC (for which i will need to write an LsaLookupNames call) should be assumed to be domain groups on the PDC.
* unused variable removedLuke Leighton1998-11-231-1/+1
|
* unix instance of group database APILuke Leighton1998-11-232-6/+22
|
* replace ' with _ as wellAndrew Tridgell1998-11-231-1/+2
|
* changed string_sub() to replace " ; and ` in the inserted string with _Andrew Tridgell1998-11-231-19/+52
| | | | use all_string_sub() if you don't want this.
* global change from samba.anu.edu.au to samba.orgAndrew Tridgell1998-11-212-2/+2
|
* Fixed problem with HAVE_NETGROUP being used on platformsJeremy Allison1998-11-181-12/+14
| | | | | that cannot support it. Jeremy.
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-1711-60/+116
| | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy.
* - group database API. oops and oh dear, the threat has been carried out:Luke Leighton1998-11-173-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the pre-alpha "domain group" etc parameters have disappeared. - interactive debug detection - re-added mem_man (andrew's memory management, detects memory corruption) - american spellings of "initialise" replaced with english spelling of "initialise". - started on "lookup_name()" and "lookup_sid()" functions. proper ones. - moved lots of functions around. created some modules of commonly used code. e.g the password file locking code, which is used in groupfile.c and aliasfile.c and smbpass.c - moved RID_TYPE_MASK up another bit. this is really unfortunate, but there is no other "fast" way to identify users from groups from aliases. i do not believe that this code saves us anything (the multipliers) and puts us at a disadvantage (reduces the useable rid space). the designers of NT aren't silly: if they can get away with a user- interface-speed LsaLookupNames / LsaLookupSids, then so can we. i spoke with isaac at the cifs conference, the only time for example that they do a security context check is on file create. certainly not on individual file reads / writes, which would drastically hit their performance and ours, too. - renamed myworkgroup to global_sam_name, amongst other things, when used in the rpc code. there is also a global_member_name, as we are always responsible for a SAM database, the scope of which is limited by the role of the machine (e.g if a member of a workgroup, your SAM is for _local_ logins only, and its name is the name of your server. you even still have a SID. see LsaQueryInfoPolicy, levels 3 and 5). - updated functionality of groupname.c to be able to cope with names like DOMAIN\group and SERVER\alias. used this code to be able to do aliases as well as groups. this code may actually be better off being used in username mapping, too. - created a connect to serverlist function in clientgen.c and used it in password.c - initialisation in server.c depends on the role of the server. well, it does now. - rpctorture. smbtorture. EXERCISE EXTREME CAUTION.
* Makefile.in configure configure.in include/config.h.in: Changes for DGUX and ↵Jeremy Allison1998-11-131-1/+1
| | | | | | | | | | | | | | UNIXWARE. groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER.
* include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.Jeremy Allison1998-11-131-2/+2
| | | | | | | lib/util_sock.c: Added strerror() calls to getpeername failures (which seem to be giving IRIX trouble at the moment). rpc_parse/parse_sec.c: Changed use of ZERO_STRUCTPN to ZERO_STRUCTP which again does zero pointer protection. smbd/quotas.c: Fixed typo. Jeremy.
* security descriptors.Luke Leighton1998-11-122-26/+39
| | | | kanji const char* warnings.
* include/kanji.h include/proto.h lib/kanji.c: Added const parameters in ↵Jeremy Allison1998-11-121-34/+34
| | | | | | | string wrappers. printing/printing.c: Added OSF1 fix. Jeremy.
* extracted the password change code from smbpasswd and used it in swatAndrew Tridgell1998-11-121-0/+53
| | | | instead of opening pipes and other horrible stuff.
* largely rewrote smbpasswd so that the code is understandable. ThisAndrew Tridgell1998-11-123-6/+6
| | | | | | | | | | | | | should allow us to call a function in swat rather than piping to smbpasswd. while doing this I also fixed quite a few "const char *" versus "char *" issues that cropped up while using const to track down bugs in the code. This led to changes in several generic functions. The smbpasswd changes should be correct but they have not been extensively tested. At least if I have introduced bugs then we should be able to fix them more easily than before.
* Fix from richard.kettlewell@kewill.com for leapyear bugs.Jeremy Allison1998-11-111-1/+5
| | | | Jeremy.
* changed syntax of registry commands so keys can start with HKLM or HKU.Luke Leighton1998-11-112-13/+86
| | | | sorted lookupsids command
* rpcclient registry commands.Luke Leighton1998-11-103-37/+156
|
* util functions split into relevant modules, first pass.Luke Leighton1998-11-101-1992/+99
|
* Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.Jeremy Allison1998-11-091-1/+1
| | | | | | | | | | | | | client/client.c: client/clitar.c: include/client.h: smbwrapper/smbw_dir.c: smbwrapper/smbw_stat.c: smbwrapper/smbw.c: lib/util.c: Converted all use of 'mode' to uint16. smbd/quotas.c: Fixed stupid comment bug I put in there :-(. printing/printing.c: Fix from J.F. to new code. Jeremy.
* split socket util functions into util_sock.c. util.c NOT committedLuke Leighton1998-11-091-0/+851
| | | | | | | | | and util_sock.c NOT included in Makefile.in. registry commands added to rpcclient. waiting for 2_0_0 split before committing modified files. these files are new modules, and are not referenced in the Makefile.in
* lib/charcnv.c: Improved debug comment.Jeremy Allison1998-11-061-1/+1
| | | | | | | | | | | libsmb/namequery.c: Fix to remove 2 second wait is we are doing a unicast and got a reply. smbd/dfree.c: smbd/noquotas.c: smbd/quotas.c: Fixes from Dejan Ilic <svedja@lysator.liu.se> for the quota code. utils/smbpasswd.c: Fixes to allow smbpasswd to be called from swat. Jeremy.
* util_file.c:Luke Leighton1998-11-052-0/+507
| | | | | | | | | split some routines out of various places (e.g smbpass.c) because they now get used in more than one location. util_sid.c: need sid_copy, compare, split rid, append rid etc etc...
* split string and unicode string routines into these files.Luke Leighton1998-11-052-0/+1162
| | | | | these are *not* going to be added into the Makefile.in yet so they still also exist in util.c.
* added copyright notice from Patrick PowellAndrew Tridgell1998-10-311-8/+5
|
* Just moving things around a bit.Christopher R. Hertel1998-10-281-328/+0
| | | | Chris -)-----
* Fixes to allow this to pass SGI compiler in -fullwarn mode (with oneJeremy Allison1998-10-281-9/+9
| | | | | annoying exception I'm still looking at :-). Jeremy.
* Quick fixes to fix the broken tree. Needed for my morning compiles.Jeremy Allison1998-10-281-2/+8
| | | | | | Chris - feel free to fix these things differently if these fixes don't work for you. Jeremy.
* fixed problem with snprintf.c and mkprotoAndrew Tridgell1998-10-281-4/+4
|
* use abort() instead of exit() in smb_panic()Andrew Tridgell1998-10-281-1/+1
| | | | | the reason we don't return() here is that smb_panic() is used not just for segv but also for detected errors (such as buffer overflows)
* fixed handling of %.0f in replacement snprintf.cAndrew Tridgell1998-10-281-12/+28
|
* add ifdef for "long double"Andrew Tridgell1998-10-271-12/+18
|
* added a vsnprintf() implementation from cvslock. See the notes on theAndrew Tridgell1998-10-262-45/+801
| | | | | | | | license at the top of lib/snprintf.c I've always been slightly uneasy about our half-baked vslprintf() implementation and the risks on platforms that don't have vsnprintf() so when I saw this code in another GPLd package I wanted it for Samba.