summaryrefslogtreecommitdiff
path: root/source4/lib/cmdline/popt_common.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r5988: Fix the -P option (use machine account credentials) to use the Samba4Andrew Bartlett1-20/+1
secrets system, and not the old system from Samba3. This allowed the code from auth_domain to be shared - we now only lookup the secrets.ldb in lib/credentials.c. In order to link the resultant binary, samdb_search() has been moved from deep inside rpc_server into lib/gendb.c, along with the existing gendb_search_v(). The vast majority of this patch is the simple rename that followed, (Depending on the whole SAMDB for just this function seemed pointless, and brought in futher dependencies, such as smbencrypt.c). Andrew Bartlett (This used to be commit e13c671619bd290a8b3cae8555cb281a9a185ee0)
2007-10-10r5976: SIDs can't have more then 5 subauths (caught by [validate] andJelmer Vernooij1-1/+1
range()) (This used to be commit ec1eaa274b997197ca6996457229c802f1b76d56)
2007-10-10r5941: Commit this patch much earlier than I would normally prefer, but ↵Andrew Bartlett1-5/+4
metze needs a working tree... The main volume of this patch was what I started working on today: - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context. - Uses sepereate inner loops for some of the DCE/RPC tests The other and more important part of this patch fixes issues surrounding the new credentials framwork: This makes the struct cli_credentials always a talloc() structure, rather than on the stack. Parts of the cli_credentials code already assumed this. There were other issues, particularly in the DCERPC over SMB handling, as well as little things that had to be tidied up before test_w2k3.sh would start to pass. Andrew Bartlett (This used to be commit 0453f9d05d2e336fba1f85dbf2718d01fa2bf778)
2007-10-10r5932: Use cli_credentials somewhat more in the Gtk+ codeJelmer Vernooij1-1/+1
Support ncacn_spx in DCE/RPC bindings. (This used to be commit a0233a3a9a83176ae46873d3a25ed601758a1511)
2007-10-10r5929: Use cli_credentials for the SMB functions as well.Jelmer Vernooij1-3/+2
Fix a couple of bugs in the new cli_credentials code (This used to be commit 4ad481cfe5cde514d2ef9646147239f3faaa6173)
2007-10-10r5917: First step in using the new cli_credentials structure. This patchJelmer Vernooij1-267/+36
puts support for it into popt_common, adds a few utility functions (in lib/credentials.c) and the callback functions for the command-line (lib/cmdline/credentials.c). Comments are welcome :-) (This used to be commit 1d49b57c50fe8c2683ea23e9df41ce8ad774db98)
2007-10-10r5135: I prepare a clean up in includes.hStefan Metzmacher1-1/+2
metze (This used to be commit 670e088e94468a5311353dbbaa7e34d200999313)
2007-10-10r4817: ccache was being made ineffective on all the build farm machinesAndrew Tridgell1-0/+1
because the version number was being auto-updated and included in all C files. With this change it is only included where needed. (This used to be commit 520cff73c6dc62ba1050cf7ca5145d50b5f2bb4e)
2007-10-10r4045: readd krb5 support defaulted to disableStefan Metzmacher1-0/+2
use: gensec:krb5=yes gensec:ms_krb5=yes to enable it or -k on the client tools on the command line metze (This used to be commit 0ae5794cf44933d2554e0356baaca24c7a784f71)
2007-10-10r3494: got rid of include/rewrite.h, and split out the dynconfig.h headerAndrew Tridgell1-0/+1
(This used to be commit 558de54ec6432a4ae90aa14a585f32c6cd03ced2)
2007-10-10r3454: moved a few more things out if includes.h into the include/system/ ↵Andrew Tridgell1-0/+1
include files. this brings us down to about 11k lines of headers included with includes.h, while still retaining the speed of building with pch (This used to be commit 10188869ef072309ca580b8b933e172571fcdda7)
2007-10-10r3453: - split out the auth and popt includesAndrew Tridgell1-0/+1
- tidied up some of the system includes - moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl knows about inter-IDL dependencies (This used to be commit 7b7477ac42d96faac1b0ff361525d2c63cedfc64)
2007-10-10r3441: some include file cleanups and general housekeepingAndrew Tridgell1-1/+1
(This used to be commit 73ea8ee6c268371d05cf74160f2ad451dd2ae699)
2007-10-10r3102: typoStefan Metzmacher1-1/+1
metze (This used to be commit 3bbda7475a63f939019a41a0b7da8d179c533d79)
2007-10-10r3101: some minor fixesStefan Metzmacher1-8/+9
metze (This used to be commit 61de2229e27c55041cb4e1aac32bc1d8ed68a05c)
2007-10-10r3100: support 'bin/smbclient //w2k3-101/c$ -U ↵Stefan Metzmacher1-1/+5
\\administrator@w2k3.vmnet1.vm.base' we need to send an empty string as userdomain in this case. fix bug #1317 in the client side metze (This used to be commit 958aa8de630b2a88f29ccdf80ac0fc44a8205401)
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell1-7/+11
of associated functions. The motivation for this change was to avoid having to convert to/from ucs2 strings for so many operations. Doing that was slow, used many static buffers, and was also incorrect as it didn't cope properly with unicode codepoints above 65536 (which could not be represented correctly as smb_ucs2_t chars) The two core functions that allowed this change are next_codepoint() and push_codepoint(). These functions allow you to correctly walk a arbitrary multi-byte string a character at a time without converting the whole string to ucs2. While doing this cleanup I also fixed several ucs2 string handling bugs. See the commit for details. The following code (which counts the number of occuraces of 'c' in a string) shows how to use the new interface: size_t count_chars(const char *s, char c) { size_t count = 0; while (*s) { size_t size; codepoint_t c2 = next_codepoint(s, &size); if (c2 == c) count++; s += size; } return count; } (This used to be commit 814881f0e50019196b3aa9fbe4aeadbb98172040)
2007-10-10r2674: I have realised that talloc() should have its context marked const, asAndrew Tridgell1-4/+9
a const pointer really means that "the data pointed to by this pointer won't change", and that is certainly true of talloc(). The fact that some behind-the-scenes meta-data can change doesn't matter from the point of view of const. this fixes a number of const warnings caused by const data structures being passed as talloc contexts. That will no longer generate a warning. also changed the talloc leak reporting option from --leak-check to --leak-report, as all it does is generate a report on exit. A new --leak-report-full option has been added that shows the complete tree of memory allocations, which is is quite useful in tracking things down. NOTE: I find it quite useful to insert talloc_report_full(ptr, stderr) calls at strategic points in the code while debugging memory allocation problems, particularly before freeing a major context (such as the connection context). This allows you to see if that context has been accumulating too much data, such as per-request data, which should have been freed when the request finished. (This used to be commit c60ff99c3129c26a9204bac1c6e5fb386114a923)
2007-10-10r2640: valgrind does a great job on some types of memory leaks, but is slowAndrew Tridgell1-4/+9
and can't properly handle leaks of doubly linked lists which we use a lot (as the memory is always reachable). Even with --show-reachable its hard to track leaks down sometimes. I realised that talloc does have the necessary information to track these, and by using the cascading property of the new talloc it can report on leaks in a much more succinct fashion than valgrind can. I have added a new samba option --leak-check that applies to all Samba tools. When enabled it prints a leak report summarising all top level contexts that are present when the program exits. A typical report looks like this: talloc report on 'null_context' (total 1071 bytes in 52 blocks) iconv(CP850,UTF8) contains 43 bytes in 3 blocks UNNAMED contains 24 bytes in 1 blocks UNNAMED contains 24 bytes in 1 blocks dcesrv_init contains 604 bytes in 26 blocks server_service contains 120 bytes in 6 blocks UNNAMED contains 24 bytes in 1 blocks UNNAMED contains 24 bytes in 1 blocks server_service contains 104 bytes in 4 blocks server_context contains 12 bytes in 2 blocks iconv(UTF8,UTF-16LE) contains 46 bytes in 3 blocks iconv(UTF-16LE,UTF8) contains 46 bytes in 3 blocks the numbers are recursive summaries for all the memory hanging off each context. this option is not thread safe when used, but the code is thread safe if the option is not given, so I don't think thats a problem. (This used to be commit 96d33d36a5639e7fc46b14a470ccac674d87c62a)
2007-10-10r2302: added a '--option' option, allowing any global or default option inAndrew Tridgell1-3/+15
smb.conf to be set on the command line. For example, you can use: smbtorture --option 'unicode=false' or smbtorture --option 'netbios name=myname' (This used to be commit 360a6b530e2295976ddefc138d1333411a94484d)
2007-10-10r2272: fixed another couple of errors in the popt option arraysAndrew Tridgell1-2/+2
(This used to be commit 89acbf4f02ae03f0546e1633c030765a563ce958)
2007-10-10r1957: add cmdline_set_* functionsStefan Metzmacher1-0/+26
and let smbclient use the cmdline _* functions metze (This used to be commit ffb87ebc33e728bf8506383f95b80605adec3c68)
2007-10-10r1949: provide functions to access the username, userdomain and userpasswordStefan Metzmacher1-1/+36
now you're prompted when cmdline_get_userpassword() is called and the password is not yet known metze (This used to be commit d14a01533c5d465ff3709c48576b798b3be807e0)
2007-10-10r1911: merge a few popt parameters from 3.0 move some to better placesStefan Metzmacher1-15/+79
and deal with users DOMAIN and lp_workgroup() of the local workstation metze (This used to be commit 1fc0100e44a8640cfc15effb99f5824cb7817da8)
2007-10-10r889: convert samba4 to use [u]int16_t instead of [u]int16Stefan Metzmacher1-1/+1
metze (This used to be commit af6f1f8a01bebbecd99bc8c066519e89966e65e3)
2004-01-28merge the version.h autogeneration stuff from 3.0Stefan Metzmacher1-1/+1
metze (This used to be commit 24dc237e109f6dce69814b22e0fb7878a7f6bfa8)
2003-12-04don't use c++ commentsAndrew Tridgell1-2/+4
(This used to be commit 3d48fa8f37a510959c8958b5c025c7f19f632c54)
2003-11-27added -m for 'max protocol' as a standard optionAndrew Tridgell1-0/+5
(This used to be commit 8fe4058711c12b8116982357723c36e862aa0bef)
2003-08-13first public release of samba4 codeAndrew Tridgell1-0/+327
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)