Age | Commit message (Collapse) | Author | Files | Lines |
|
dbwrap needs it. Some calls were already wrapped, but they checked the
talloc_stackframe() return unnecessarily: it can never be NULL.
This is the coccinelle patch I used:
// Add in a stackframe to every function: be sure to free it on (every) return
@rule0@
identifier func;
@@
func(...) {
+TALLOC_CTX *frame = talloc_stackframe();
<...
+talloc_free(frame);
return ...;
...>
}
// Get rid of tframe allocation/frees, replace usage with frame.
@rule1@
identifier func;
identifier oldframe;
@@
func(...) {
...
-TALLOC_CTX *oldframe;
...
-if ((oldframe = talloc_stackframe()) == NULL) {
- ...
-}
<...
-talloc_free(oldframe);
...>
}
// Get rid of tframe (variant 2)
@rule2@
identifier func;
identifier oldframe;
@@
func(...) {
...
-TALLOC_CTX *oldframe;
...
-oldframe = talloc_stackframe();
-if (oldframe == NULL) {
- ...
-}
<...
-talloc_free(oldframe);
...>
}
// Change tframe to frame
@rule3@
identifier func;
@@
func(...) {
<...
-tframe
+frame
...>
}
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
If you want a stack-style allocation, use talloc_stackframe(). If you
don't, don't use it. In particular, talloc_stackframe() here is actually
inside a pool, and stealing from pools is a bad idea.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This will be used in samba3upgrade to try and get the group memberships by instead asking
for the groups each user is in. This reverse lookup may be more reliable, as this
is used at login time.
Andrew Bartlett
|
|
|
|
This will make it easier to consistantly pass a struct unixid all the way up and
down the idmap stack, and allow ID_TYPE_BOTH to be handled correctly.
Andrew Bartlett
Signed-off-by: Michael Adam <obnox@samba.org>
|
|
There is no need to call pdb_set_pass_must_change_time() because
nothing ever consults that value. It is always calculated from the
domain policy.
Also, this means we no longer store the value in LDAP. The value
would only ever be set when migrating from tdbsam or smbpasswd, not on
password changes, so would become incorrect over time.
Andrew Bartlett
|
|
Uninitialized gid value is set to -1 and return as such from python
passdb api.
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Nov 18 06:18:33 CET 2011 on sn-devel-104
|
|
this is possible because we know the py_passdb will always set -1
here, not passing though 0xFFFFFFFF.
Andrew Bartlett
|
|
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Nov 11 12:04:33 CET 2011 on sn-devel-104
|
|
This may help to ensure we consistantly crash on an incorrect de-reference.
Andrew Bartlett
|
|
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
lm_pw and nt_pw are fixed length strings and convert them to python
strings as fixed length strings.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104
|
|
Return pw_history with current string length (which is a multiple
of PW_HISTORY_ENTRY_LEN) and same thing for setting the pw_history.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Instead of returning rids as the C api does, return sids, so it is
similar to enum_aliasmem and can be used easily in s3_upgrade.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Set the defaults, if no arguments are provided.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Added following methods
- uid_to_sid, gid_to_sid, sid_to_id, new_rid
- get_trusteddom_pw, set_trusteddom_pw, del_trusteddom_pw, enum_trusteddoms
- get_trusted_domain, get_trusted_domain_by_sid, set_trusted_domain,
del_trusted_domain, enum_trusted_domains
- get_secret, set_secret, delete_secret
Updated documentation for all methods
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
- Added Groupmap python wrapper
- Added passdb methods
getgrsid, getgrgid, getgrnam
create_dom_group, delete_dom_group
add_group_mapping_entry, update_group_mapping_entry, delete_group_mapping_entry
enum_group_mapping, enum_group_members
add_groupmem, del_groupmem
create_alias, delete_alias
get_aliasinfo, set_aliasinfo
add_aliasmem, del_aliasmem, enum_aliasmem
get_account_policy, set_account_policy
search_groups, search_aliases
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104
|
|
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
|
|
- Added python wrapper for samu structure.
- Added python wrapper for passdb methods:
domain_info(), getsampwnam(), getsampwsid(), create_user(),
delete_user(), add_sam_account(), delete_sam_account(),
update_sam_account(), rename_sam_account(), search_users()
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|