summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/examples/common.c
AgeCommit message (Collapse)AuthorFilesLines
2025-07-29s3:lib: Fix CID 1497484 use-after-free.Vinit Agnihotri1-0/+1
p was not set to NULL after being free'd, this can cause a use-after-free situation. This fixes coverity issue#1497484 Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jul 29 15:01:42 UTC 2025 on atb-devel-224
2022-05-23s3:lib: Fix use_after_free: Using freed pointer "p"Pavel Filipenský1-0/+1
Found by covscan. Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-12-15s3:lib: Do not close fd = -1 on fail in netapi exampleAndreas Schneider1-1/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-12-15s3:lib: Fix memory leak in netapi examplesAndreas Schneider1-2/+6
Found by covscan. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-07-14s3-libnetapi: add netapi_save_file_ucs2() to example codeGünther Deschner1-0/+58
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2021-07-14s3-libnetapi: add netapi_read_file helperGünther Deschner1-0/+88
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2019-01-28s3:netapi: Use C99 initializer for poptOption in netapi exampleAndreas Schneider1-6/+35
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2011-10-21s3-netapi: fix missing include in examples code.Günther Deschner1-0/+2
Guenther
2008-04-13libnetapi: add libnetapi_set_use_kerberosGünther Deschner1-0/+4
Don't unconditionally set the kerberos flag for authentication. Guenther (This used to be commit 15bef5ae413adf278cccc0e547c4b8ccd180eca2)
2008-04-08Fix includes in libnetapi examples common.cGünther Deschner1-1/+4
Guenther (This used to be commit 922ff9d01668c2c2ad10decfd09c0e7b3f0d7592)
2008-04-08Use popt in libetapi example code.Günther Deschner1-0/+58
Guenther (This used to be commit 6f239df3f5a57c9549f1637e53fd42d2ed604c3f)