1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-10 04:23:50 +03:00
Commit Graph

1549 Commits

Author SHA1 Message Date
Andrew Tridgell
6ffdfd7799 r1985: take advantage of the new talloc in a few more places 2007-10-10 12:58:14 -05:00
Andrew Tridgell
03c341aca7 r1984: this change is what you should read to understand the new talloc()
It simplifies our structure handling a lot, making the code shorter
and easier to understand. Look at the diff carefully and see if you
can understand it. If you're still confused then please ask.
2007-10-10 12:58:14 -05:00
Andrew Tridgell
e35bb094c5 r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
2007-10-10 12:58:14 -05:00
Andrew Tridgell
db4bc88f9a r1982: i is not initialised or used 2007-10-10 12:58:14 -05:00
Andrew Tridgell
73e9ee7914 r1973: for systems that don't have strtoull() try strtouq(). This should fix
the build for some BSD varients.
2007-10-10 12:58:14 -05:00
Andrew Tridgell
d07dbdb22a r1972: cmdline_auth_info does not need to be declared global 2007-10-10 12:58:14 -05:00
Stefan Metzmacher
d965f84f69 r1961: print out the dcerpc fault code, when we got NT_STATUS_NET_WRITE_FAULT
(this need to be done more generic for all dcerpc calls,
 but for now I just need it in this 2 places)

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
ffb87ebc33 r1957: add cmdline_set_* functions
and let smbclient use the cmdline _* functions

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
741f95909b r1952: change the _RPC levels into _SAMR
because we may have other rpc levels in future

add more comments about what's going on

check the rsult of samr_OpenUser

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
b660e5b9e6 r1951: add 'net password set' call
use it like:
net password set user
net password set DOM\\user
net password set user pass
net password set DOM\\user pass
net password set -U DOM\\Administrator%admpass DOM\\user pass

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
af6b5673b0 r1950: implement libnet_SetPassword_rpc()
this currently tries only SetUserInfo26
the fallback is not yet done

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
d14a01533c r1949: provide functions to access the username, userdomain and userpassword
now you're prompted when cmdline_get_userpassword() is called
and the password is not yet known

metze
2007-10-10 12:58:13 -05:00
Stefan Metzmacher
1c72f30650 r1947: fix cup & paste errors
metze
2007-10-10 12:58:13 -05:00
Simo Sorce
8be31e5c85 r1944: put ldif functions in a separate file 2007-10-10 12:58:13 -05:00
Stefan Metzmacher
35624842c7 r1943: don't use the with --enable-*developer selected flags for
the configure tests.

and test if the compiler really understand the options,
and clear them when not

this means we can maybe use --enable-developer on the build farm now

metze
2007-10-10 12:58:12 -05:00
Andrew Tridgell
8925b8b219 r1941: - fixed an allocation error with querying security descriptors remotely
- print the received security_descriptor in the smbclient "acl" command

- make sure we zero the alignment data in nttrans packet sends
2007-10-10 12:58:12 -05:00
Jelmer Vernooij
8bf6841a8e r1929: CHeck if cpp on AIX likes /* */ better then // 2007-10-10 12:58:12 -05:00
Stefan Metzmacher
84c06d9ab0 r1928: give up on NT_STATUS_PASSWORD_RESTRICTION
(NOTE: this code pass isn't called yet,
       because pidl mixes the NTSTATUS of transport and request layer,
       and will be fixed soon)

metze
2007-10-10 12:58:12 -05:00
Stefan Metzmacher
d0e518e7d0 r1927: allow the domain to be a ip address
metze
2007-10-10 12:58:12 -05:00
Stefan Metzmacher
eb93d38de0 r1926: fallback to other SAMR ChangePasswordUser levels
1. ChangePasswordUser3
2. ChangePasswordUser2
3. OemChangePasswordUser2
4. ChangePasswordUser (not implemented complete)

metze
2007-10-10 12:58:12 -05:00
Stefan Metzmacher
2012d90f26 r1925: now we lookup the domain controller
and fallback to a workstation name

metze
2007-10-10 12:58:11 -05:00
Volker Lendecke
5d9b5a2e58 r1920: This needs more inspection by the IDL experts. Reverting my last change.
Volker
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
f1b9c1f3dd r1919: paasword change basicly works now:-)
but we need to find the real pdc for the users domain
and fallback to other levels

metze
2007-10-10 12:58:11 -05:00
Volker Lendecke
c26dc367e4 r1917: Attempt to push the AIX machine a bit further in the compile. I'm not sure,
but pidl there says "syntax error".

Volker
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
a908f831cb r1916: return a more clear error, we are miss configure in this case
metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
aedb2e9e1c r1915: use popt's cmdline_auth_info to fill the net_context
and print the user domain when prompting for a new password

metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
52b866c403 r1914: use common popt stuff in net
metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
a1bb734009 r1913: add --version back
metze
2007-10-10 12:58:11 -05:00
Stefan Metzmacher
ecf6be894f r1912: move popt_common.h
metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
1fc0100e44 r1911: merge a few popt parameters from 3.0 move some to better places
and deal with users DOMAIN and lp_workgroup() of the local workstation

metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
0164cac6df r1910: this should not be a local var in this block
metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
e9e5fb2cb0 r1909: nicer format
metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
c358f11406 r1907: init the configuration
and fix compiler warning

metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
11495a42b9 r1905: add -Werror-implicit-function-declaration with --enable-developer
metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
b3cae309ae r1904: catch the common gtk function prototypes with make proto
metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
64d61ef4a5 r1903: hmm a better solution is to include popt.h where it is needed
metze
2007-10-10 12:58:10 -05:00
Stefan Metzmacher
edde7497e9 r1902: we need to include popt.h before popt_common.h
metze
2007-10-10 12:58:09 -05:00
Stefan Metzmacher
5e5681e283 r1901: add missing include of <fnmatch.h>
metze
2007-10-10 12:58:09 -05:00
Stefan Metzmacher
a60b528b34 r1900: fix function prototypes
metze
2007-10-10 12:58:09 -05:00
Simo Sorce
d721b122b5 r1898: Check the context we are going to return. 2007-10-10 12:58:09 -05:00
Andrew Tridgell
2ce4028842 r1897: added a choose_called_name() function that allows us to more sanely
handle connections using the IP as the server name, while not trying
for NBT name resolution on names like "192" and "192.168.1.2".

also removed the ip address argument to smbcli_socket_connect() as it
isn't used and doesn't really make sense.
2007-10-10 12:58:09 -05:00
Andrew Tridgell
30ab38559e r1896: stricter check on packet parsing for NBT session replies 2007-10-10 12:58:09 -05:00
Andrew Tridgell
e50fc00671 r1895: added a note about OPEN_BY_FILE_ID to the ntcreatex interface definition 2007-10-10 12:58:09 -05:00
Volker Lendecke
5dc793b2b4 r1894: Convert // to /* */ 2007-10-10 12:58:09 -05:00
Andrew Tridgell
cd8887293e r1893: add a commented out lump of code to implement the "by the SPEC"
ALL_INFO queryfileinfo level. It is useful having it here as many
non-Microsoft servers implement it this way, which breaks just about
all the torture tests, so when testing against these broken systems
just change this one #if line and recompile smbtorture.
2007-10-10 12:58:08 -05:00
Andrew Tridgell
01dc4ed9b4 r1892: this adds talloc_get_context(), which is something I discussed at the
team meeting at CIFS04. It allows you to find the talloc context given
any pointer allocated with talloc.
2007-10-10 12:58:08 -05:00
Volker Lendecke
7be7f25a57 r1886: Fix the build 2007-10-10 12:58:08 -05:00
Stefan Metzmacher
874d450609 r1884: remove empty header file
metze
2007-10-10 12:58:08 -05:00
Stefan Metzmacher
d3123c2e73 r1883: I don't know why this was broken...
tridge: can you please check if this is correct,
        I have only compiled it, but haven'T run it.

metze
2007-10-10 12:58:08 -05:00
Stefan Metzmacher
4c6c4d6bc8 r1881: empty structs are not allowed by all compilers
metze
2007-10-10 12:58:08 -05:00