summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
AgeCommit message (Collapse)AuthorFilesLines
2026-02-15python: Align py_ntstatus.c with py_hresult.cVolker Lendecke1-3/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-15python: Simplify py_hresult.cVolker Lendecke1-10/+7
CFLAGS=-Og did not finish this file. Also, this makes the file a few hundred kilobytes smaller Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-06-05samba_dnsupdate: samba-tool add avoids existing record error messagesDouglas Bagnall1-0/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13613 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Rowland Penny <rpenny@samba.org>
2025-06-05samba_dnsupdate: slightly clarify handling of argsDouglas Bagnall1-3/+4
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13613 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Rowland Penny <rpenny@samba.org>
2024-12-18s4:scripting: fix gen_hresult.pyStefan Metzmacher1-2/+2
Commit 6877e4849e81ed8f7f355fa4069f13a134e999ce reversed the return values of hresult_errstr() and hresult_errstr_const(). hresult_errstr() should return "HRES_SEC_E_WRONG_PRINCIPAL", while hresult_errstr_const() should return "The target principal name is incorrect.". BUG: https://bugzilla.samba.org/show_bug.cgi?id=15769 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2024-10-23Add ntstatus_gen for RustDavid Mulder1-2/+50
Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-05-22spelling: comments: synthax -> syntaxDouglas Bagnall1-2/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-05-22spelling: fix spelling of privilege.ldb in commentsDouglas Bagnall1-1/+1
'privileges' is a word, but the ldb referred to is privilege.ldb Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-23s3:libads: always require ber_sockbuf_add_io() and LDAP_OPT_SOCKBUFStefan Metzmacher1-1/+1
There's no point in trying to support --with-ads, but only use plaintext ldap without sign/seal. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-10python:upgrade/upgradeprovision: use dn.copy to align ldbsDouglas Bagnall1-3/+3
We need to do this when the dn is on a message from another ldb. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-10s4:samba_upgradeprovision: align DN ownershipDouglas Bagnall1-2/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-01-23lib: Avoid 70k of r/w memoryVolker Lendecke1-29/+12
This adds more .text than it strips .data, but .text is shared between all processes, .data is copied. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2024-01-23lib: Simplify hresult.cVolker Lendecke1-2/+2
Functions don't need a ; at the end. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2024-01-15python: Generate HRESULT definitions automaticallyJoseph Sutton1-3/+43
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Joseph Sutton <jsutton@samba.org> Autobuild-Date(master): Mon Jan 15 01:56:53 UTC 2024 on atb-devel-224
2024-01-15s4:scripting: Remove obsolete references to function prototypesJoseph Sutton2-6/+0
These prototypes were removed in commit 0ffe030c0dcd46b51ffb2f11c03d5b48e93d32b9. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Remove trailing whitespaceJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Generate HRESULT definitions as part of the build processJoseph Sutton1-11/+15
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Ensure generated error definition files are closed after useJoseph Sutton1-5/+4
This helps to avoid warnings like this one: /data/samba/source4/scripting/bin/gen_hresult.py:178: ResourceWarning: unclosed file <_io.TextIOWrapper name='/data/samba/bin/default/libcli/util/hresult.c' mode='w' encoding='UTF-8'> main() ResourceWarning: Enable tracemalloc to get the object allocation traceback Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Remove global list of errorsJoseph Sutton1-11/+7
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Use common function to parse error descriptionsJoseph Sutton1-55/+10
The version of parseErrorDescriptions() from gen_error_common is almost the same as the one we’ve been using. One minor difference is that ErrorDef.error_code is now an integer rather than a string. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Remove blank lineJoseph Sutton1-1/+0
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Correctly report number of parsed linesJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Let error definition generation scripts tolerate empty linesJoseph Sutton1-0/+2
Commit beb99b80612556bc47e72a63f89fca75839d91d4 add a similar check just for gen_hresult.py. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Initialize line number to (possibly) more appropriate valueJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Initialize ‘isWinError’ in constructorJoseph Sutton1-0/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15s4:scripting: Align integer typesJoseph Sutton1-2/+2
Commit a41112fcc984c19d5123e4a49a5f5fd4341e811d updated the generated code, but not the corresponding generation script. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-12-14python: Remove unused parameter ‘samdb’Joseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘lp’Joseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘message’Joseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20Use python.h from libreplaceAndreas Schneider2-2/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-10librpc: Fix the build on FreeBSDVolker Lendecke1-1/+2
ndr_wsp.h included standalone does not find struct timespec on FreeBSD Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-10-25librpc/rpc: Add windows propertyset info and associated accessor and helper api.Noel Power1-0/+201
wsp_util.c contains property definitions for well known windows properties that can be used with WSP. These properties are generated from some csv files (located in the librpc/wsp). The csv files themselves were generated from a couple of sources e.g. the [MS-WSP]: Windows Search Protocol document and wireshark mswsp dissector source code. for more details please see librpc/wsp/README Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-16gpdupate: Implement Drive Maps Client Side ExtensionDavid Mulder1-0/+2
Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-14s4:scripting: Prefer ‘x not in y’ to ‘not x in y’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-14s4:scripting: Fix commentsJoseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-14s4:scripting: Remove unused importsJoseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14s4:scripting: Fix code spellingAndreas Schneider1-15/+15
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-19upgradeprovision: handle operatingSystem similar to operatingSystemVersionStefan Metzmacher1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-14s4/scripting/bin: Add NT_STATUS_OK to list of definitionsJoseph Sutton1-1/+10
Add NT_STATUS_OK to our pre-generated list of status codes. Ensure it goes first in the list to ensure that code that previously found this error code in ‘special_errs’ maintains the same behaviour by falling back to ‘nt_errs’. This makes NT_STATUS_OK available to Python code using the ‘ntstatus’ module. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-05s4/scripting: fix % len(res) was in the wrong placeRob van der Linde1-1/+1
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri May 5 05:54:11 UTC 2023 on atb-devel-224
2023-05-05s4/dsdb: fix unnecessary backslashRob van der Linde1-3/+3
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-05s4/scripting: fix a few trailing semicolons in gen_{hresult,ntstatus,werror}.pyRob van der Linde3-17/+17
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-05s4/scripting: fix a few invalid docstring argsRob van der Linde1-3/+2
One arg "dn" was removed, the others just had a typo. Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-05s4/scripting/bin: Remove unused importsJoseph Sutton2-3/+3
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-05s4/scripting/bin: Fix resource leakJoseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-22python:provision: run adprep as part of provisionStefan Metzmacher1-1/+1
With the default of base_schema=2019 we'll adprep to 2016. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-09libcli: Shrink .data segment by 43264 bytesVolker Lendecke1-7/+5
A case statement only references const strings, pointers in an array need to be relocated at exec() time. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09libcli: Shrink .data segment by 43264 bytesVolker Lendecke1-11/+14
A case statement only references const strings, pointers in an array need to be relocated at exec() time. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-03s4:samba_spnupdate: Fix typoJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-03s4:samba_dnsupdate: Avoid resource leaksJoseph Sutton1-12/+16
View with 'git show -b'. The seek(0) call is unnecessary. Closing a file removes the lock held on it. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>