summaryrefslogtreecommitdiff
path: root/source3/utils/net_usershare.c
AgeCommit message (Collapse)AuthorFilesLines
2025-11-10s3: talloc_destroy() -> TALLOC_FREE()Volker Lendecke1-2/+2
Sweeping change, I know. Should not change compiled code in most cases, the compiler should be smart enough to elide the assignment right before a return. In the cases where this is not right before the return, TALLOC_FREE() is safer as it makes use-after-free crash. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-04-16lib: Give lib/util/util_file.c its own header fileVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2023-04-12s3:net_usershare: Correctly escape newline in error messageJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-04-12s3:net_usershare: Handle allocation failureJoseph Sutton1-0/+20
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2022-08-17s3:utils remove documentation of -l as alias for --longChristian Ambach1-8/+8
This was removed in 94fc9ca4c506468ab1907d501c0964d67b9d963c, so remove it from the usage output and manpage. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15145 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Aug 17 07:14:21 UTC 2022 on sn-devel-184
2020-08-28s3: safe_string: do not include string_wrappers.hMatthew DeVore1-0/+1
Rather than have safe_string.h #include string_wrappers.h, make users of string_wrappers.h include it explicitly. includes.h now no longer includes string_wrappers.h transitively. Still allow includes.h to #include safe_string.h for now so that as many modules as possible get the safety checks in it. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-11-27smbdotconf: mark "usershare path" with substitution="1"Ralph Boehme1-4/+10
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2018-12-11net: Use dom_sid_str_bufVolker Lendecke1-1/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-12-07net_usershare: Use dom_sid_str_bufVolker Lendecke1-6/+8
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-11-21s3: utils: net. Fix return paths that don't free talloc stackframe.Jeremy Allison1-1/+4
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13151 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2013-03-06Make sure to set umask() before calling mkstemp().Andreas Schneider1-0/+3
Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
2012-08-09Correctly check for errors in strlower_m() returns.Jeremy Allison1-2/+6
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-4/+4
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-04-05build: Remove SMB_STRUCT_DIR defineAndrew Bartlett1-3/+3
2012-04-05build: Remove SMB_STRUCT_DIRENT defineAndrew Bartlett1-2/+2
2012-04-05build: Remove sys_closedir wrapperAndrew Bartlett1-7/+7
2012-04-05build: Remove sys_readdir wrapperAndrew Bartlett1-2/+2
2012-04-05build: Remove sys_opendir wrapperAndrew Bartlett1-3/+3
2012-04-05build: Remove sys_open wrapperAndrew Bartlett1-2/+2
2011-06-09s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/passwd.h when needed.Günther Deschner1-0/+1
Guenther
2011-01-26s3-utils: Fixed possible resource leak in net_usershare.Andreas Schneider1-0/+5
s3-utils: Fixed possible resource leak in net_usershare.
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-0/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-05-21s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett1-1/+1
This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".Günther Deschner1-1/+1
Guenther
2010-03-26Fix bug #7240 - Net usershare is not case sensitive.Jeremy Allison1-4/+19
Updates usershare files in a backwards compatible way. I don't intend to back port this fix to 3.5.x as it depends on a version upgrade in the share_info.tdb share security database. Jeremy.
2009-11-29s3: "net_usershare_add" only looks at the mode, device and inodeVolker Lendecke1-1/+1
2009-11-29s3: "net_usershare_add" only looks at the device and inodeVolker Lendecke1-2/+1
2009-11-29s3: "net_usershare_add" only looks at the mode and uidVolker Lendecke1-1/+1
2009-11-29s3: "count_num_usershares" only looks at the modeVolker Lendecke1-2/+1
2009-11-29s3: "info_fn" only looks at the mode and uidVolker Lendecke1-1/+1
2009-11-29s3: "get_share_list" only looks at the mode and uidVolker Lendecke1-2/+1
2009-11-29s3: Pass the "fake dir create times" parameter to sys_*statVolker Lendecke1-6/+9
Step 0 to restore it as a per-share paramter
2009-08-11s3 net: i18n support for net usershareKai Blin1-90/+146
2009-07-18s3: Fix crsh in net usershare listBo Yang1-0/+1
Signed-off-by: Bo Yang <boyang@samba.org>
2009-07-15s3: Fix double free in net usershare.Bo Yang1-28/+4
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke1-7/+7
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.
2009-04-20Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() ifJelmer Vernooij1-1/+1
the system one is broken.
2009-04-14Convert Samba3 to use the common lib/util/charset APIAndrew Bartlett1-6/+6
This removes calls to push_*_allocate() and pull_*_allocate(), as well as convert_string_allocate, as they are not in the common API To allow transition to a common charcnv in future, provide Samba4-like strupper functions in source3/lib/charcnv.c (the actual implementation remains distinct, but the API is now shared) Andrew Bartlett
2008-10-12Use common util_file code.Jelmer Vernooij1-2/+2
2008-06-10net: Rename functable3 to functable, get rid of old functablesKai Blin1-2/+2
(This used to be commit bb7c5fc4ec77db4073d3beccf12af12910b6bd07)
2008-06-10net: Make "net usershare" use functable3Kai Blin1-29/+49
(This used to be commit b45ada159e1eec757eaf5210517139aae4159119)
2008-05-20net: Use true/false instead of True/False.Kai Blin1-9/+9
(This used to be commit a8b567aac3b0e39cfe67fb97167b10312ca5e73a)
2008-05-10net: more whitespace cleanupKai Blin1-6/+6
(This used to be commit ef0184d580500734fc7af51e1c790b075180a3d0)
2008-05-10net: Remove globalsKai Blin1-29/+36
(This used to be commit 1e9319cf88b65a2a8d4f5099a1fe5297e405ed2e)
2007-12-15s/sid_to_string/sid_to_fstring/Volker Lendecke1-1/+2
least surprise for callers (This used to be commit eb523ba77697346a365589101aac379febecd546)
2007-12-15Replace sid_string_static with sid_string_tosVolker Lendecke1-1/+2
In utils/ I was a bit lazy... (This used to be commit 60e830b0f4571bd5d9039f2edd199534f2a4c341)
2007-12-03Gone from usershare.Jeremy Allison1-61/+151
Jeremy. (This used to be commit f1555f4f0d66e57fd19f200f842e4d05527accd5)
2007-11-24Remove a staticVolker Lendecke1-3/+5
(This used to be commit 85a84f72ffc440fb71744cb72de2dba07793123c)