summaryrefslogtreecommitdiffstats
path: root/source3/utils/net.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:utils: avoid argv related const warningsStefan Metzmacher2014-04-021-3/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: smbpasswd - fix crashes on invalid input.Jeremy Allison2013-12-161-0/+5
| | | | | | | | | | | | | | | | get_pass can return NULL on error. Ensure that this is always the case and fix all callers to cope (some already did). Reported by Joonas Kuorilehto <joneskoo@codenomicon.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10320 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Dec 16 15:17:58 CET 2013 on sn-devel-104
* s3:utils: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3fs-client: Burn commandline password of client utils.Andreas Schneider2012-11-081-0/+2
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 8 21:24:21 CET 2012 on sn-devel-104
* s3fs-net: Use talloc for memory allocation.Andreas Schneider2012-10-301-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed by: Jeremy Allison <jra@samba.org>
* s3:utils/net: remove unused "net connections"Stefan Metzmacher2012-10-191-7/+0
| | | | | | | | The connections.tdb will go away. metze Signed-off-by: Michael Adam <obnox@samba.org>
* s3:net add command "connections cleanup"Gregor Beck2012-08-161-0/+7
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3:net registry import: add option --precheckGregor Beck2012-06-261-0/+2
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* net: Let get*sid return error from passdb initChristof Schmitt2012-04-301-6/+4
| | | | | | | | | When initialize_password_db returns an error this means that the SID stored in the backend cannot be read. Return this error directly instead of creating a random SID through get_global_sam_sid. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Apr 30 13:07:20 CEST 2012 on sn-devel-104
* s3: Remove a bunch of calls to procid_self()Volker Lendecke2011-12-121-2/+1
| | | | All callers to messaging_[re]init only used procid_self()
* s3-net Do not look for a local SID when we are a DCAndrew Bartlett2011-11-171-7/+8
| | | | | | | If we are actually a DC, then the only SID we have is the domain SID, and looking for it under the local name fails if we are a Samba4 AD DC. Andrew Bartlett
* s3:net: add command registry checkGregor Beck2011-10-121-0/+4
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3:net: use lp_load_global()Michael Adam2011-07-281-1/+1
|
* s3-net: Bind our gettext results to 'unix charset'Andrew Bartlett2011-06-231-0/+10
| | | | | | | | | | This ensures that the translations and any embedded strings are in the same charset. It won't be the one from the user's locale (we no longer auto-detect that), but it will be self-consistent. Thanks to Steve Langasek for pointing this function out! Andrew Bartlett
* s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett2011-06-091-5/+5
| | | | | | | | There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
* s3-build Remove distinct LOCALEDIR subsystemAndrew Bartlett2011-04-131-1/+1
| | | | | | | This is no different to the rest of dynconfig, and so should be dealt with there. Andrew Bartlett
* s3-net: add command "net idmap check"Gregor Beck2011-04-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a tool to check the consistency of an idmap tdb database. The default mode is to scan the database and list invalid entries, e.g. records with an invalid format, or records which are valid but for which the reverse mapping entry is missing. With the "--repair" switch, one can enter an interactive repair mode which will prompt for each invalid entry found with the option to delete, skip or edit the record. There is also a non-interactive repair mode triggered by "--auto" which will remove all records with invalid content and fill up mappings which are missing the reverse entry. The "--test" parameter lets "net idmap check" only list the changes that would be written and not actually commit them to the database. The "--lock" option allows to lock the database already in the first reading traverse, in order to remove the race when the database has to be closed and reopened again before writing the changes. Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Mon Apr 4 18:21:09 CEST 2011 on sn-devel-104
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-passdb: add passdb.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3:net add option --dbGregor Beck2011-02-091-1/+2
|
* s3: Fix a typoVolker Lendecke2011-02-021-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Feb 2 14:58:52 CET 2011 on sn-devel-104
* Fix bug 7866 - "net" in v3-6-test broken.Jeremy Allison2010-12-151-3/+3
| | | | | | | Someone wasn't careful about testing when not running as root :-). Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Dec 15 20:45:25 CET 2010 on sn-devel-104
* s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() insteadAndrew Bartlett2010-11-021-8/+1
| | | | | | | | | By removing this global variable, the API between the two different debug systems is made more similar. Both s3 and s4 now have lp_set_cmdline() which ensures that the smb.conf cannot overwrite these the user-specified log level. Andrew Bartlett
* s3-debug Impove setup_logging() to specify logging to stderrAndrew Bartlett2010-11-021-1/+2
| | | | | | | | This change improves the setup_logging() API so that callers which wish to set up logging to stderr can simply ask for it, rather than directly modify the dbf global variable. Andrew Bartlett
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* s3-dsgetdcname: always pass in messaging context.Günther Deschner2010-09-231-0/+6
| | | | | | Volker, please check. Guenther
* s3-net: only include netapi header when needed.Günther Deschner2010-08-061-0/+1
| | | | Guenther
* s3-popt: Only include popt-common.h when needed.Andreas Schneider2010-08-051-0/+1
|
* s3-secrets: only include secrets.h when needed.Günther Deschner2010-08-051-0/+1
| | | | Guenther
* s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett2010-05-211-4/+4
| | | | | | | | | | This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* s3-net: Added a rather trivial "net printing dump" command.Günther Deschner2010-05-181-0/+8
| | | | Guenther
* s3: Fix a long-standing problem with recycled PIDsVolker Lendecke2010-03-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a samba server process dies hard, it has no chance to clean up its entries in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb. For locking.tdb and brlock.tdb Samba is robust by checking every time we read an entry from the database if the corresponding process still exists. If it does not exist anymore, the entry is deleted. This is not 100% failsafe though: On systems with a limited PID space there is a non-zero chance that between the smbd's death and the fresh access, the PID is recycled by another long-running process. This renders all files that had been locked by the killed smbd potentially unusable until the new process also dies. This patch is supposed to fix the problem the following way: Every process ID in every database is augmented by a random 64-bit number that is stored in a serverid.tdb. Whenever we need to check if a process still exists we know its PID and the 64-bit number. We look up the PID in serverid.tdb and compare the 64-bit number. If it's the same, the process still is a valid smbd holding the lock. If it is different, a new smbd has taken over. I believe this is safe against an smbd that has died hard and the PID has been taken over by a non-samba process. This process would not have registered itself with a fresh 64-bit number in serverid.tdb, so the old one still exists in serverid.tdb. We protect against this case by the parent smbd taking care of deregistering PIDs from serverid.tdb and the fact that serverid.tdb is CLEAR_IF_FIRST. CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not work when all smbds are restarted. For this, "net serverid wipe" has to be run before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up sessionid.tdb and connections.tdb. While there, this also cleans up overloading connections.tdb with all the process entries just for messaging_send_all(). Volker
* Fix typo in comments.Karolin Seeger2010-03-031-1/+1
|
* s3: Implement global locks in a g_lock tdbVolker Lendecke2010-02-121-0/+7
| | | | | | This is the basis to implement global locks in ctdb without depending on a shared file system. The initial goal is to make ctdb persistent transactions deterministic without too many timeouts.
* s3: Add --use-ccache to netVolker Lendecke2010-01-241-0/+1
|
* s3 net: Fix compile warningsKai Blin2010-01-191-4/+7
|
* s3 net/i18n: Use only one spelling for "Usage:"Kai Blin2010-01-191-4/+4
|
* s3/net: split up some printable stings to ease i18nBjörn Jacke2010-01-181-4/+4
| | | | | | If we put strings like "Usage:" into separate _() macros and not the whole "Usage:..." string we can cover much more messages by only one single translation. The drawback is that the message in the sources looks less pretty.
* s3: use enum netr_SchannelType all over the place.Günther Deschner2009-10-131-2/+2
| | | | Guenther
* s3: Remove the lua interpreter againVolker Lendecke2009-09-291-7/+0
| | | | | This was meant to support async winbind. But as the hairy parts of async winbind (getgrent) are done without it, it can go again.
* s3 net: Add getauthuser/setauthuser commands.Kai Blin2009-08-181-0/+124
| | | | These replace the functionality of wbinfo --get-auth-user/--set-auth-user
* Fix EVERY SINGLE build on the buildfarm that doesn't haveJeremy Allison2009-08-121-0/+4
| | | | | | bindtextdomain or textdomain. C'mon, this is what configure.in is *FOR*. Jeremy.
* s3 net: Initial top level support.Kai Blin2009-07-291-153/+152
|
* Make the smbd VFS typesafeVolker Lendecke2009-07-241-1/+0
|
* Revert "net: Use samba default command line arguments."Kai Blin2009-07-221-10/+33
| | | | | | | | | | This reverts commit fb262f79fab00374023e59476e8d05a1015a7041 and related commits c36031778e1983ddb11d3e1fcab35e738dbf94bc 72fd5fa6bb78a054fad5e5ebe19a0c0387a7d45b and 38cd0e086f50ce54d88a19aa5a6803469af90489 This change caused more trouble than it solved. We need to do this differently. Reverting so we don't accidently release this.
* Make gencache more stableVolker Lendecke2009-07-151-0/+2
| | | | | | | | | | This provides a compromise between stability and performance: gencache is a persistent database these days that for performance reasons can not use tdb transactions for all writes. This patch splits up gencache into gencache.tdb and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, writes to it don't use transactions. By default every 5 minutes and when a program exits, all entries from _notrans.tdb are transferred to gencache.tdb in one transaction.
* net: Use samba default command line arguments.Kai Blin2009-05-251-33/+10
| | | | | | | | | | | | | | | | | | Attention: The meaning of the -N flag changed. To get the old meaning for net groupmap set, use the long option --ntname The long option for using kerberos changed from --kerberos to --use-kerberos net rpc commands will now prompt for a password if none is given. As a benefit, net will now accept an authentication file like other samba command line tools. So no need to specify the password on the command line in scripts anymore. This should fix bug #6357 Signed-off-by: Kai Blin <kai@samba.org>
* s3-net: make "net eventlog" help output a little more appropriate.Günther Deschner2009-04-291-1/+1
| | | | Guenther
* s3:net: add --request-timeout optionStefan Metzmacher2009-04-171-0/+1
| | | | metze
* Shape up pdb_search a bit by making it a talloc ctx with a destructorVolker Lendecke2009-03-071-4/+5
|