summaryrefslogtreecommitdiff
path: root/source3/registry/regfio.c
Commit message (Collapse)AuthorAgeFilesLines
* regfio: Return instead of assert for short blocksMichael Hanselmann2019-06-201-1/+2
| | | | | | | | | | | Assertions should only be used when there's absolutely no recovery or to verify data structure invariants. In this case the supplied registry hive file may have a malformed block with a size of zero. Such a block should not terminate the whole program. Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* regfio: Update code near recent changes to match README.CodingAndrew Bartlett2019-03-201-8/+14
| | | | | | | | | This file long predates our current code conventions. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13840 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* regfio: Improve handling of malformed registry hive filesMichael Hanselmann2019-03-201-1/+6
| | | | | | | | | | | | | | | * next_record: A malformed file can lead to an endless loop. * regfio_rootkey: Supplying a malformed registry hive file to the registry hive I/O code can lead to out-of-bounds reads. Test cases are included. Both issues resolved have been identified using AddressSanitizer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13840 Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* regfio: Use correct function names in debug informationMichael Hanselmann2019-03-201-3/+3
| | | | | | Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix typos in "valid"Michael Hanselmann2019-03-201-1/+1
| | | | | | | | s/vald/valid/ Signed-off-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam2016-02-061-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* source3/registry: Fix CID 1273100 Stray semicolonAnoop C S2015-06-151-1/+1
| | | | | | Signed-off-by: Anoop C S <achiraya@redhat.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Convert all uint32/16/8 to _t in a grab-bag of remaining files.Richard Sharpe2015-05-141-8/+8
| | | | | | | | | | I still need to fix the rpc stuff, but we are almost there. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104
* Convert all uses of uint32/16/8 to _t in source3/registry.Richard Sharpe2015-05-121-11/+11
| | | | | Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Change the registry subsystem to use uint32_t from uint32. Also change ↵Richard Sharpe2015-04-161-72/+72
| | | | | | | | | | session.h. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 16 00:37:28 CEST 2015 on sn-devel-104
* s3:registry/regfio fix some valgrind warningsChristian Ambach2014-12-021-2/+2
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:registry/regfio read SD from the correct locationChristian Ambach2014-12-021-2/+4
| | | | | | | | | try to find the security descriptor at the data pointer, not at the beginning of the hbin Bug: https://bugzilla.samba.org/show_bug.cgi?id=9629 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-reg: Fix copy and paste error in debug message.Andreas Schneider2012-11-301-2/+2
| | | | Found by coverity.
* Fix bug 9065: source3/registry/regfio.c: bad call to memcpyDavid Binderman2012-07-251-1/+1
| | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 25 02:42:32 CEST 2012 on sn-devel-104
* s3: Fix some False/NULL hickupsVolker Lendecke2011-12-201-9/+9
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
* s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-7/+7
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* libcli/security: move secdesc.c to the top level libcli/securityAndrew Bartlett2011-05-311-0/+1
| | | | | | | This code does not rely on lp_ or other source3 only functions, so can be part of the common library. Andrew Bartlett
* s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett2011-05-181-1/+1
| | | | | | | strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* s3-includes: no point in including all security headers globally.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-registry: remove some unused headers.Günther Deschner2011-03-181-2/+0
| | | | Guenther
* s3: Remove superfluous ;Günther Deschner2011-02-021-1/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Feb 2 15:44:21 CET 2011 on sn-devel-104
* s3-registry: use some prs macros to the only place where they are used.Günther Deschner2010-07-161-0/+6
| | | | Guenther
* Move the remnants of rpc_parse code under registry/Simo Sorce2010-07-161-0/+1
| | | | | | | | The registry code is the only last user of this code. Move everything under registry/ and hope someone will get rid od it completely from there in the future. Signed-off-by: Günther Deschner <gd@samba.org>
* s3-misc: Move smb_io_time() to regfio.cSimo Sorce2010-07-161-0/+32
| | | | | | | | This is the last file using this function and we do not want anyone else to keep using hand marshalled stuff anyway. So make it also private to that file. Signed-off-by: Günther Deschner <gd@samba.org>
* s3-build: only use ndr_security.h where needed.Günther Deschner2010-05-311-0/+1
| | | | Guenther
* s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".Günther Deschner2010-05-181-3/+3
| | | | Guenther
* s3: Remove use of iconv_convenience.Jelmer Vernooij2010-05-181-2/+2
|
* s3-registry: only include registry headers when really needed.Günther Deschner2010-05-181-0/+1
| | | | Guenther
* s3: convert registry and printing code to TYPESAFE_QSORT()Andrew Tridgell2010-02-141-2/+1
|
* s3-registry: update to use new DLIST macrosAndrew Tridgell2010-02-101-2/+2
| | | | (cherry picked from commit 3437713ad7e5bccafde30553a8232119fd2a9eb9)
* s3: "regf_hbin_allocate" only looks at the sizeVolker Lendecke2009-11-291-1/+1
|
* s3: "read_block" only looks at the sizeVolker Lendecke2009-11-291-1/+1
|
* s3: "write_block" does not use the sbuf at allVolker Lendecke2009-11-291-1/+1
|
* s3: Pass the "fake dir create times" parameter to sys_*statVolker Lendecke2009-11-291-3/+3
| | | | Step 0 to restore it as a per-share paramter
* Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke2009-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
* s3:registry: replace typedef REGISTRY_VALUE by struct regval_blobMichael Adam2009-04-271-2/+3
| | | | Michael
* s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.Michael Adam2009-04-271-2/+2
| | | | | | | This paves the way for hiding the typedef and the implementation from the surface. Michael
* s3: Use common security_descriptor_equal().Jelmer Vernooij2009-04-211-1/+1
|
* s3-registry: remove last sec_io_desc() caller.Günther Deschner2009-03-251-2/+24
| | | | | | This is a temporary solution while waiting for the regf merge from s4. Guenther
* s3:registry: replace typedef "REGSUBKEY_CTR" by "struct regsubkey_ctr"Michael Adam2009-02-261-1/+1
| | | | | | | This paves the way for hiding the typedef and the implementation from the surface. Michael
* Add iconv_convenience argument to size functions.Jelmer Vernooij2009-01-011-2/+2
|
* Fix Coverity ID 471Volker Lendecke2008-03-231-1/+1
| | | | (This used to be commit d3b6df67fea0da5ffa962837400ebe07b34a5384)
* Coverity fixesMarc VanHeyningen2008-03-171-1/+4
| | | | (This used to be commit 3fc85d22590550f0539215d020e4411bf5b14363)
* Fix double free bugs after calling regfio_close()Tim Potter2008-02-201-4/+0
| | | | (This used to be commit 737bb950d50ac6c5d4f99279bf535ae3a9963b2f)
* Fix Coverity IDs 451, 452Volker Lendecke2008-01-251-1/+1
| | | | (This used to be commit d28a537277bedb65d1c2a01c971a3a22b1aa6624)
* Remove tiny code duplicationVolker Lendecke2007-12-291-2/+3
| | | | | ndr_size_security_descriptor does the same as sec_desc_size (This used to be commit bc3bd7a8e7c6e9e27acb195c86abb92c0f53112f)