summaryrefslogtreecommitdiff
path: root/source3/lib
AgeCommit message (Collapse)AuthorFilesLines
1999-02-09removal of the use of unistrn2 function: replace it with unistr2_to_strLuke Leighton1-1/+1
which is more appropriate. (This used to be commit ac72fe1ab3d10f64a5945ccbd4ed3817e30f9f7b)
1999-02-08UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()Luke Leighton1-6/+6
(This used to be commit 9084b7e33dfe717bd8d5604ee71d137e3baef0f5)
1999-02-03cache unix groups so that two-level getgrent calls don't occur.Luke Leighton2-0/+72
(This used to be commit f7dfa55a2e191ae780d399026bce48f68cda4bf0)
1999-02-01Added init_nt_time function which initialises an NTTIME to -1.Matthew Chapman1-7/+9
(This used to be commit e1e3875057bed830fdc0aaa9c85f04a1479fd64a)
1999-01-13fixed an uninitialized variable in lookupsmbgrpgid() andGerald Carter2-1/+3
lookupsmbpwuid that was causing a SEGFAULT in smbd. (This used to be commit cabc7e739cb6a6c8dfc4b6988a8ef5837e3312d2)
1998-12-20adding start of remote lookup for domain member role.Luke Leighton1-29/+125
(This used to be commit 090512e18770bab9222a30e68dee83d1612eca10)
1998-12-16A while back, Andrew and I talked about making the debug parsing code aChristopher R. Hertel1-1/+159
better "fit" with other Samba code. This is a small first step toward doing what (I think) we agreed to do. I've moved the key function from ubiqx/debugparse.c into lib/debug.c. I have also moved the enum from ubiqx/debugparse.h into the debug section in smb.h. The next thing to do is to get debug2html added into the Makefile.in so that it is always produced when compiling the suite. Chris -)----- (This used to be commit 782474f41e0c2bc0b1f098758a3e5cb44e87d8b1)
1998-12-14added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids.Luke Leighton1-5/+40
(This used to be commit 0b2095e092d747f741e78a3349f0b81a72811629)
1998-12-14trying to track down issues in get_home_dir().Luke Leighton1-4/+8
(This used to be commit 2cce78aa00f31b79d51aaf46da72019b926e8226)
1998-12-09oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ.Luke Leighton2-16/+15
(This used to be commit ca10eb44909e66a07dc7f88b0a740390f9ec3922)
1998-12-09need to initialise global_myworkgroupLuke Leighton1-1/+14
(This used to be commit 501617307f3b9bbad76406d00b1bc82f5cb479a6)
1998-12-08Adding George's Mac extension code.Jeremy Allison1-0/+140
Jeremy. (This used to be commit b993081db1d371b8f0d16db23a46a2d5fedcc9ef)
1998-12-07fixed warnings (and potential errors) due to integer overflow whenAndrew Tridgell1-2/+3
creating locking masks (This used to be commit 5e2844d5edb15de29b976d2ff077ffbe012b860c)
1998-12-07first attempt at making unix setuid/setgid code that is independent ofLuke Leighton1-0/+303
cnums and snums. (This used to be commit 657f46edfbea852309505f5e3065506127eda6a2)
1998-12-07removed nt_pipe_fnum from struct cli_state. need to be able to callLuke Leighton1-6/+7
LsaLookupSids etc from within SamrQueryAliasMembers, for example. fnum is now a parameter to client functions. thanks to mike black for starting the ball rolling. (This used to be commit bee8f7fa6b0f7f995f71303f4e14a4aaed0c2437)
1998-12-05oops - lock test was the wrong way aroundAndrew Tridgell1-1/+1
(This used to be commit 783d4b3477fa9e363aa1f7524bd060019648ab0d)
1998-12-05fixed pidfile handling to check for a lock on the file, so we can beAndrew Tridgell1-16/+33
sure it is a samba process that is running. (This used to be commit f7ad78e369ebf2f4d31e8259e3e1fdd4c087b037)
1998-12-04- renamed do_samr_xxx to samr_xxxLuke Leighton2-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) (This used to be commit eacc5e581af2b4de24186b9be3238b352c54effe)
1998-12-03moved get_unixgroups it will be needed by the unix instance of the groupLuke Leighton1-0/+49
DB API (This used to be commit ef58e48bc9af338ed6c734205d4faf82371284ac)
1998-12-03jean-f spotted bug in test for existence of MACHINE.SID and SAM_NAME.SID.Luke Leighton1-1/+1
(This used to be commit 81be1e60764d380adf47737552659854d94ca626)
1998-12-02removed check on name of domain having to be right, etc etc.Luke Leighton1-8/+0
(This used to be commit a74b6dcc76794c1fe350d6906f156fdf5189e18b)
1998-12-02issues spotted by andrej: %s\\%s not %s\%sLuke Leighton1-2/+2
(This used to be commit 779a7aa30d4b8a3c8ca1d817a3fd9886c0437def)
1998-12-02string_to_sid was using next_token() this is bad as it stops you fromLuke Leighton1-43/+44
being able to use next_token() outside of string_to_sid calls. use strchr instead (This used to be commit 1c478ca1723558cc5dde693b4abacb56bd98cd43)
1998-12-01fixing smbpasswd to link to smbd to obtain domain sidLuke Leighton2-4/+7
(This used to be commit bfb75e58ced1082d3bb7d6b3f3367d50a0ca26ea)
1998-12-01rpc_samr.h parse_samr.c srv_samr.c :Luke Leighton2-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. (This used to be commit 3e1eb4f26b67e484b05e1dde94fd4e4dae982631)
1998-12-01fix to domain_namemap (domain, ntname wrong way round oops)Luke Leighton3-7/+7
stupid compile errors with file_rename() call just created. (This used to be commit f5cedb8c9618b83b63b5e2db867d238eebc7e13c)
1998-12-01adding some samr parsing calls (group / alias adding / deleting)Luke Leighton3-9/+36
added code that moves MACHINE.SID to DOMAIN_NAME.SID if it exists. (This used to be commit 51c1c31768a92d9c57ee6c09b78419bcbc544f03)
1998-11-30attempting to fix "domain user map" up, but it's a bit complicated.Luke Leighton3-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... (This used to be commit 474f94f419a531e33b475249da7efb99ac22f454)
1998-11-30- adding builtin[alias]db.Luke Leighton3-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. (This used to be commit e4930f5f48f8246ceec8add8bf769954a963190c)
1998-11-29"retired" two modules to preserve their cvs history.Luke Leighton3-0/+2184
added their replacements, added sam password database API modules (This used to be commit b1d1c1337c69c6f6bf25ab932a1a6a757e3ea2ae)
1998-11-29weekend work. user / group database API.Luke Leighton2-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... (This used to be commit 5d5d7e4de7d1514ab87b07ede629de8aa00519a1)
1998-11-25Makefile.in: Added maintainer mode fixes.Jeremy Allison7-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. (This used to be commit 6acb4b68f68d516e2ac3c47e500f5600d653435e)
1998-11-24sorting out difference between aliases and groups in the cases whereLuke Leighton1-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. (This used to be commit 53b49b44e13a4ca9818ebc947372b1374831b568)
1998-11-23unused variable removedLuke Leighton1-1/+1
(This used to be commit 16ac5c89b7417a6aa2596c5c7fbb1fa7542accfd)
1998-11-23unix instance of group database APILuke Leighton2-6/+22
(This used to be commit e76f593b3572ac881f1aa1fb3326d8b7169b0078)
1998-11-23replace ' with _ as wellAndrew Tridgell1-1/+2
(This used to be commit e93491953a2555401a372de74ac2aee0cc44cb88)
1998-11-23changed string_sub() to replace " ; and ` in the inserted string with _Andrew Tridgell1-19/+52
use all_string_sub() if you don't want this. (This used to be commit a3357ab49335106674fe7a7481cd0f146d74fbe5)
1998-11-21global change from samba.anu.edu.au to samba.orgAndrew Tridgell2-2/+2
(This used to be commit 42d2509c9fab5c774fd33b9d4b5bd1ee125479c3)
1998-11-18Fixed problem with HAVE_NETGROUP being used on platformsJeremy Allison1-12/+14
that cannot support it. Jeremy. (This used to be commit 7a6f25ac4ab0f0bef7a66f26004c15120248ff66)
1998-11-17Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison11-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. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
1998-11-17- group database API. oops and oh dear, the threat has been carried out:Luke Leighton3-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. (This used to be commit 0d21e1e6090b933f396c764af535ca3388a562db)
1998-11-13Makefile.in configure configure.in include/config.h.in: Changes for DGUX and ↵Jeremy Allison1-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. (This used to be commit 4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c)
1998-11-13include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.Jeremy Allison1-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. (This used to be commit b62f008974c96e0302d6c146cf49bc2045bef005)
1998-11-12security descriptors.Luke Leighton2-26/+39
kanji const char* warnings. (This used to be commit 06abdfd68e1d7fa8741afc3f56ec7a13b5fa4ccc)
1998-11-12include/kanji.h include/proto.h lib/kanji.c: Added const parameters in ↵Jeremy Allison1-34/+34
string wrappers. printing/printing.c: Added OSF1 fix. Jeremy. (This used to be commit 9d05d80f811426f83a975d28e64c5d6b10574c25)
1998-11-12extracted the password change code from smbpasswd and used it in swatAndrew Tridgell1-0/+53
instead of opening pipes and other horrible stuff. (This used to be commit 49bf19710345a59a2d17cd449be1a132885ed821)
1998-11-12largely rewrote smbpasswd so that the code is understandable. ThisAndrew Tridgell3-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. (This used to be commit 713864dd0322ae2ae2d83e333d85be35a7eed4ec)
1998-11-11Fix from richard.kettlewell@kewill.com for leapyear bugs.Jeremy Allison1-1/+5
Jeremy. (This used to be commit 751856a09d4fa112ce2fedd963b42ae5f63c89c1)
1998-11-11changed syntax of registry commands so keys can start with HKLM or HKU.Luke Leighton2-13/+86
sorted lookupsids command (This used to be commit 13a0ee851fe0ce9acddfe57f9aba19fc78085c39)
1998-11-10rpcclient registry commands.Luke Leighton3-37/+156
(This used to be commit 36fcb4a6e643a05d06a2a273d74318fee7f2c647)