1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

219 Commits

Author SHA1 Message Date
Andrew Bartlett
0e58705a5b python: Remove Python 2.4 support macros
We require Python 2.6

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2016-01-07 23:33:10 +01:00
Andrew Bartlett
c3647ec39e web_server: Fix server not to segfault on startup
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug 31 04:11:55 CEST 2015 on sn-devel-104
2015-08-31 04:11:55 +02:00
Andrew Bartlett
615d9b734e web_server: Use talloc_get_type_abort()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
2015-08-31 01:10:22 +02:00
Stefan Metzmacher
f7883ae02a s4:lib/socket: simplify iface_list_wildcard() and its callers
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10464
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Change-Id: Ib317d71dea01fc8ef6b6a26455f15a8a175d59f6
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Mar  7 02:18:17 CET 2014 on sn-devel-104
2014-03-07 02:18:17 +01:00
Jelmer Vernooij
87afc3aee1 Move python modules from source4/scripting/python/ to python/.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Mar  2 03:57:34 CET 2013 on sn-devel-104
2013-03-02 03:57:34 +01:00
Jelmer Vernooij
2618d67fe5 wsgi: Serve '500 Internal Server Error' page when errors occur.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Dec  5 18:40:25 CET 2012 on sn-devel-104
2012-12-05 18:40:25 +01:00
Jelmer Vernooij
ad252fb2f5 web_server: Make second argument to websrv_output const. 2012-12-05 14:56:43 +01:00
Jelmer Vernooij
12c72a3835 wsgi: When encountering error in Python code, print traceback to logs.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-05 14:56:43 +01:00
Jelmer Vernooij
bfc6a9e21d web_server: the web server is not multi-process, indicate so in WSGI.
This is a requirement for some of the paster middleware used by SWAT2.

Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:51 -08:00
Jelmer Vernooij
b89e7f6e51 web_server: Properly decrement reference counters for python objects in wsgi.
Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:46 -08:00
Jelmer Vernooij
ac635d02de web_server: Properly set SCRIPT_NAME and PATH_INFO.
Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:42 -08:00
Jelmer Vernooij
3bffb585ba web_server: Create a string object for SERVER_PORT variable.
This matches the behaviour of other wsgi server implementations.

Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:57:33 -08:00
Jelmer Vernooij
31f0e24fbe web_server/wsgi: Don't segfault when wsgi app doesn't return iterable.
There is a bug in the application if this happens, but invalid Python
code shouldn't cause segfaults.

Reviewed-by: Matthieu Patou <mat@matws.net>
2012-11-22 14:56:59 -08:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Simo Sorce
c84caabf8c s4:misc: remove last usage of legacy event_ fn names
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Aug 14 00:38:13 CEST 2011 on sn-devel-104
2011-08-14 00:38:13 +02:00
Andrew Tridgell
40dc94a53f s4-ipv6: update callers to load_interface_list() 2011-06-06 12:26:10 +10:00
Andrew Tridgell
78a8087213 s4-webserver: fixed a talloc reference error on startup failure 2011-06-06 12:26:10 +10:00
Andrew Tridgell
8f3ce14ea7 s4-ipv6: use "ip" instead of "ipv4" for servers
this allows stream_setup_socket() to work with both v4 and v6
addresses
2011-06-06 12:26:10 +10:00
Andrew Tridgell
dc8c8fd9e4 s4-ipv6: use iface_list_wildcard() to listen on IPv6
when we need to listen on a wildcard address, we now listen on a list
of sockets, usually 0.0.0.0 and ::
2011-06-06 12:26:10 +10:00
Andrew Bartlett
22cb631b4f s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed.  Hopefully we can actually wrap one around the
other in future.

Andrew Bartlett
2011-05-08 12:57:04 +02:00
Jelmer Vernooij
0b4eb47e27 source4/: Fix prototypes for all functions in various subsystems. 2011-03-19 03:20:05 +01:00
Andrew Bartlett
15d0166340 s4-python Don't force "bin" into the python sys.path
This patch uses the fact that dyn_PYTHONDIR and dyn_PYTHONARCHDIR is
now set properly at all times, incluidng for installed and
build-directory binaries.  So we don't need to make assumptions about
bin being magic any more.

Andrew Bartlett
2011-02-07 13:22:02 +11:00
Jelmer Vernooij
7982f683ee web_server: Fix initialization. 2011-01-17 00:30:49 +01:00
Jelmer Vernooij
04abf2cc8d web_server: Avoid references to swat. Load samba.web_server instead. 2011-01-17 00:25:42 +01:00
Matthias Dieter Wallnöfer
fef1174ba8 s4:web_server - immeditately assign "wdata" as private data for the stream socket
This fixes bug #7887.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Jan 14 22:33:13 CET 2011 on sn-devel-104
2011-01-14 22:33:13 +01:00
Jelmer Vernooij
5792fa90ac s4-python: Only set BASETYPE flag if subclassing is supported.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jan  1 03:39:58 CET 2011 on sn-devel-104
2011-01-01 03:39:58 +01:00
Matthias Dieter Wallnöfer
c8d888772a s4:dsdb/pydsdb.c and web_server/wsgi.c - remove accidentally introduced Py_RETURN_NONE
This was only thought for Python 2.3 which we generally no longer support (only
pyldb in the LDB library is an exception).
2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
05706e1801 s4:web_server/*.c - optimise includes
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Dec 12 18:23:05 CET 2010 on sn-devel-104
2010-12-12 18:23:05 +01:00
Matthias Dieter Wallnöfer
978a14d40c s4:web_server/wsgi.c - fix a counter type 2010-12-12 17:27:36 +01:00
Matthias Dieter Wallnöfer
f05ddcfbe6 s4:web_server/wsgi.c - add missing Python compatibility code 2010-12-12 17:27:09 +01:00
Jelmer Vernooij
02f77214c2 cldap: Build as shared module. 2010-11-15 03:14:23 +01:00
Andrew Tridgell
ef7f4a1420 s4-server: make server sockets a child of the task context
We previously allocated sockets as direct children of the event
context. That led to crashes if a service called
task_server_terminate(), as it left the socket open and handling
events for a dead protocol.

Making them a child of the task allows the task to terminate and take
all its sockets with it.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-15 10:19:34 +11:00
Jelmer Vernooij
f0cdcd940e web_server: Build as module.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 14 17:58:05 UTC 2010 on sn-devel-104
2010-11-14 17:58:05 +00:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Andrew Tridgell
046d38faa5 s4-smbd: don't initialise process models more than once
this also removes the event_context parameter from process model
initialisation. It isn't needed, and is confusing when a process model
init can be called from more than one place, possibly with different
event contexts.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-30 23:49:00 +11:00
Andrew Tridgell
2dcb596e83 s4-waf: removed dependencies on missing subsystems
these were left over from the old config.mk system
2010-10-21 19:03:24 +11:00
Jelmer Vernooij
5324b943e7 wafsamba: Fix handling of pyembed/pyext. 2010-10-10 23:54:04 +00:00
Jelmer Vernooij
c15e919a09 wafsamba: Clarify needs_python argument name, use pyembed/pyext where
applicable.

Allow using both pyembed and pyext, to prevent unresolved symbols.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 10 03:54:01 UTC 2010 on sn-devel-104
2010-10-10 03:54:01 +00:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Tridgell
4cb423f527 s4-python: python is not always in /usr/bin
Using "#!/usr/bin/env python" is more portable. It still isn't ideal
though, as we should really use the python path found at configure
time. We do that in many places already, but some don't.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-24 18:46:57 +10:00
Jelmer Vernooij
9382507909 web_server: Don't build wsgi support as python module but rather as
subsystem so we don't install it into /usr/lib.
2010-06-18 23:51:40 +02:00
Matthias Dieter Wallnöfer
76cd237ee5 s4:web_server/wsgi.c - free the "env" and "inputstream" objects on an "asprintf" failure 2010-05-30 11:12:25 +02:00
Matthias Dieter Wallnöfer
f11cf62016 s4:web_server/wsgi.c - provide a better out-of-memory handling for an "asprintf" call 2010-05-28 18:58:45 +02:00
Matthias Dieter Wallnöfer
ce99f9e734 s4:web_server/wsgi.c - fix "asprintf" call 2010-05-28 10:04:48 +02:00
Stefan Metzmacher
6129aa0cf5 s4:web_server: use tsocket_address functions to get the local ip and port
metze
(cherry picked from commit 9a1a00199c)
2010-04-28 15:45:02 +02:00
Matthias Dieter Wallnöfer
d1db751ff8 Revert "s4:web_server: use tsocket_address functions to get the local ip and port"
This reverts commit 9a1a00199c.

This broke the build.
2010-04-27 18:45:42 +02:00
Stefan Metzmacher
9a1a00199c s4:web_server: use tsocket_address functions to get the local ip and port
metze
2010-04-27 17:05:30 +02:00
Andrew Tridgell
b0fb567f04 s4-waf: more dependencies on talloc
these are needed so we can support a system talloc without using the
bundled talloc.h
2010-04-06 20:27:13 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00