summaryrefslogtreecommitdiff
path: root/source4/lib/cmdline
AgeCommit message (Collapse)AuthorFilesLines
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 Metzmacher2-2/+7
\\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-10r2003: got rid of next_token_nr(), which involved some horrible globalsAndrew Tridgell1-1/+1
and nasy pointer tricks. this involved fixing some of the internals of smbclient (This used to be commit 126fec6169f9412932c82e7675840476132bce87)
2007-10-10r1972: cmdline_auth_info does not need to be declared globalAndrew Tridgell1-2/+0
(This used to be commit d07dbdb22acc4c9cafb7141486fbf162d9f8164e)
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-10r1912: move popt_common.hStefan Metzmacher1-0/+51
metze (This used to be commit ecf6be894fc47f9e00f46531e06ef20e11115c0f)
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)
2007-10-10r665: merge over the new build system from my tmp branchStefan Metzmacher1-3/+5
to the main SAMBA_4_0 tree. NOTE: that it's not completely ready, but it's functional:-) metze (This used to be commit c78a2ddb28ec50d6570a83b1f66f18a5c3621731)
2004-02-22- creat the LIBCMDLINE subsystemStefan Metzmacher1-0/+79
including readline and popt - creat the CONFIG subsystem including param/* dynconfig.* and passdb/secrets.* metze (This used to be commit bfd7fd21c8e38c0065fc41dde10e863a169878c2)
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 Tridgell2-0/+486
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)