[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3c9b32b replace: Avoid DEBUG(), which is not available in libreplace. via 49eca29 libreplace: Add usleep implementation. via c9fb336 use usleep rather than sys_usleep in various places, in anticipation of usleep moving to libreplace. from c0288e0 lib/util: Remove obsolete sys_getpid() and sys_fork(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3c9b32b5eb1220b8521f768bab8dc07a40de93f5 Author: Jelmer Vernooij Date: Sat Mar 24 21:18:55 2012 +0100 replace: Avoid DEBUG(), which is not available in libreplace. Autobuild-User: Jelmer Vernooij Autobuild-Date: Sun Mar 25 00:13:59 CET 2012 on sn-devel-104 commit 49eca290d37ad7564a3be3332ee76020ddb5a03f Author: Jelmer Vernooij Date: Sat Mar 24 21:17:56 2012 +0100 libreplace: Add usleep implementation. commit c9fb33697db1bdc1967a0cca557ad323ebe4ea22 Author: Jelmer Vernooij Date: Sat Mar 24 20:43:07 2012 +0100 use usleep rather than sys_usleep in various places, in anticipation of usleep moving to libreplace. --- Summary of changes: lib/replace/replace.c | 16 - lib/replace/replace.h |6 source3/include/proto.h |1 - source3/lib/system.c| 34 --- source3/passdb/pdb_smbpasswd.c |2 +- source3/rpc_server/spoolss/srv_spoolss_nt.c |2 +- source3/utils/net_rpc_service.c |2 +- source3/utils/status_profile.c |2 +- 8 files changed, 25 insertions(+), 40 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/replace/replace.c b/lib/replace/replace.c index 03fae90..c076ba1 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -851,7 +851,7 @@ void *rep_memalign( size_t align, size_t size ) size_t pagesize = (size_t)-1; #endif if (pagesize == (size_t)-1) { - DEBUG(0,("memalign functionality not available on this platform!\n")); + errno = ENOSYS; return NULL; } if (size < pagesize) { @@ -890,3 +890,17 @@ int rep_getpeereid(int s, uid_t *uid, gid_t *gid) #endif } #endif + +#ifndef HAVE_USLEEP +int rep_usleep(useconds_t sec) +{ + struct timeval tval; + /* +* Fake it with select... +*/ + tval.tv_sec = 0; + tval.tv_usec = usecs/1000; + select(0,NULL,NULL,NULL,&tval); + return 0; +} +#endif /* HAVE_USLEEP */ diff --git a/lib/replace/replace.h b/lib/replace/replace.h index f2b1952..776da8a 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -835,4 +835,10 @@ char *rep_getpass(const char *prompt); int rep_getpeereid(int s, uid_t *uid, gid_t *gid); #endif +#ifndef HAVE_USLEEP +#define usleep rep_usleep +typedef long useconds_t; +int usleep(useconds_t); +#endif + #endif /* _LIBREPLACE_REPLACE_H */ diff --git a/source3/include/proto.h b/source3/include/proto.h index a4fb496..779745a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -318,7 +318,6 @@ int sys_set_nfs_quota(const char *path, const char *bdev, /* The following definitions come from lib/system.c */ -int sys_usleep(long usecs); ssize_t sys_read(int fd, void *buf, size_t count); ssize_t sys_write(int fd, const void *buf, size_t count); ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt); diff --git a/source3/lib/system.c b/source3/lib/system.c index 92e244f..238f84b 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -52,40 +52,6 @@ /*** - A wrapper for usleep in case we don't have one. -/ - -int sys_usleep(long usecs) -{ -#ifndef HAVE_USLEEP - struct timeval tval; -#endif - - /* -* We need this braindamage as the glibc usleep -* is not SPEC1170 complient... grumble... JRA. -*/ - - if(usecs < 0 || usecs > 99) { - errno = EINVAL; - return -1; - } - -#if HAVE_USLEEP - usleep(usecs); - return 0; -#else /* HAVE_USLEEP */ - /* -* Fake it with select... -*/ - tval.tv_sec = 0; - tval.tv_usec = usecs/1000; - select(0,NULL,NULL,NULL,&tval); - return 0; -#endif /* HAVE_USLEEP */ -} - -/*** A read wrapper that will deal with EINTR. / diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 4d5bed4..c1dabc4 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -217,7 +217,7 @@ static FILE *star
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c0288e0 lib/util: Remove obsolete sys_getpid() and sys_fork(). from 55bd279 lib/util: Allow calloc use in util.c, too. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c0288e0612187ecbfc4a81d071fd504ea8737b7a Author: Jelmer Vernooij Date: Sat Mar 24 20:17:08 2012 +0100 lib/util: Remove obsolete sys_getpid() and sys_fork(). The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104 --- Summary of changes: lib/util/become_daemon.c |2 +- lib/util/fault.c |2 +- lib/util/samba_util.h| 10 lib/util/system.c| 31 -- source3/auth/pass_check.c|4 +- source3/client/client.c |4 +- source3/include/rpc_misc.h |4 +- source3/lib/ctdbd_conn.c |4 +- source3/lib/pidfile.c|2 +- source3/lib/server_prefork.c |4 +- source3/lib/smbldap.c|4 +- source3/lib/smbrun.c |4 +- source3/lib/substitute.c |2 +- source3/lib/system.c |2 +- source3/lib/tdb_validate.c |2 +- source3/lib/util.c |8 +++--- source3/libsmb/clientgen.c |2 +- source3/libsmb/libsmb_context.c |2 +- source3/modules/vfs_aio_fork.c |2 +- source3/modules/vfs_notify_fam.c |2 +- source3/modules/vfs_preopen.c|2 +- source3/nmbd/asyncdns.c |2 +- source3/nmbd/nmbd.c |2 +- source3/nmbd/nmbd_packets.c |2 +- source3/nmbd/nmbd_synclists.c|2 +- source3/nmbd/nmbd_winsserver.c |4 +- source3/passdb/pdb_smbpasswd.c |2 +- source3/passdb/secrets.c |2 +- source3/printing/print_cups.c|2 +- source3/printing/printing.c | 20 source3/printing/printing_db.c |2 +- source3/printing/queue_process.c |2 +- source3/printing/spoolssd.c |2 +- source3/rpc_server/epmd.c|2 +- source3/rpc_server/lsasd.c |2 +- source3/rpc_server/rpc_handles.c |2 +- source3/rpc_server/samr/srv_samr_chgpasswd.c |2 +- source3/rpc_server/svcctl/srv_svcctl_nt.c|2 +- source3/smbd/files.c |2 +- source3/smbd/negprot.c | 28 +++--- source3/smbd/oplock_irix.c |2 +- source3/smbd/process.c | 22 +- source3/smbd/server.c|6 ++-- source3/smbd/service.c |2 +- source3/smbd/session.c |2 +- source3/smbd/utmp.c |2 +- source3/winbindd/winbindd.c |2 +- source3/winbindd/winbindd_cm.c |4 +- source3/winbindd/winbindd_dual.c |6 ++-- 49 files changed, 95 insertions(+), 136 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c index 4c1d29e..92a7586 100644 --- a/lib/util/become_daemon.c +++ b/lib/util/become_daemon.c @@ -75,7 +75,7 @@ _PUBLIC_ void close_low_fds(bool stdin_too, bool stdout_too, bool stderr_too) _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout) { if (do_fork) { - if (sys_fork()) { + if (fork()) { _exit(0); } } diff --git a/lib/util/fault.c b/lib/util/fault.c index b3527bb..d0b34e5 100644 --- a/lib/util/fault.c +++ b/lib/util/fault.c @@ -70,7 +70,7 @@ static void fault_report(int sig) counter++; DEBUGSEP(0); - DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)",sig,(int)sys_getpid(),SAMBA_VERSION_STRING)); + DEBUG(0,("INTERNAL ERROR: Signal %d in pid %d (%s)",sig,(int)getpid(),SAMBA_VERSION_STRING)); DEBUG(0,("\nPlease read the Trouble-Shooting section of the Samba HOWTO\n")); DEBUGSEP(0); diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index f989231..6096722 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -113,16 +113,6 @@ void CatchChild(void); **/ void Catc
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 55bd279 lib/util: Allow calloc use in util.c, too. via 85aa077 adt_tree: Fix return types. via 456abea replace: Work around socket wrapper. via 10dd5f1 replace: Add system/network.h for ucred struct. via 5ba8ada s3-waf: Use samba3-util library instead of lots of tiny libs. via 6f1b735 adt_tree: Avoid WERROR. via 71d41a0 libreplace: Add getpeereid implementation. via 76bb68f util_malloc: Remove unused constant. via 32fd6d6 lib/util: Remove dummy wrapper for getgrgid(). via 2a82c45 lib/util: Remove dummy wrapper for getgrnam(). via 43f2750 lib/util: Remove dummy wrapper for getpwuid(). via 818e072 lib/util: Remove dummy wrapper for getpwnam(). via 3be6258 lib/util: Remove dummy wrappers for setpwent/getpwent/endpwent. via 14fdc1c lib/util: Move calloc_array and memalign_array to top-level libutil. via c0c52ac lib/util: Remove prototype for removed sys_memalign. via 2d5275f lib/util: Remove trivial wrapper sys_connect() around connect(). via 2c94446 cli_pipe: Avoid sys_connect. via e7cd529 sock_exec: Avoid sys_connect. via a9c22de util_sock: Avoid sys_connect. via eb3617c ctdb_conn: Avoid sys_connect. via d4c4cb0 replace: Move memalign() from lib/util/system.c to libreplace. from 1080483 Improve the Makefile. Use a standard make macro, not a shell command. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 55bd27935fe0bf31945d0137a1673499e7fcb1ad Author: Jelmer Vernooij Date: Sat Mar 24 17:16:26 2012 +0100 lib/util: Allow calloc use in util.c, too. Autobuild-User: Jelmer Vernooij Autobuild-Date: Sat Mar 24 18:50:32 CET 2012 on sn-devel-104 commit 85aa07761abbbf1212e244c8b0a835e41834ae16 Author: Jelmer Vernooij Date: Sat Mar 24 17:11:11 2012 +0100 adt_tree: Fix return types. commit 456abea8941dfb6dab6e69a760532426a781d9ba Author: Jelmer Vernooij Date: Sat Mar 24 17:05:29 2012 +0100 replace: Work around socket wrapper. It's fine to ignore socket wrapper here, as it doesn't deal with unix domain sockets. commit 10dd5f186fa31b3abfb8c65bfe3c1b31215106e3 Author: Jelmer Vernooij Date: Sat Mar 24 16:50:37 2012 +0100 replace: Add system/network.h for ucred struct. commit 5ba8adadd3fdeb00658cdfc071d8499e58e39e3b Author: Jelmer Vernooij Date: Sat Mar 24 16:42:47 2012 +0100 s3-waf: Use samba3-util library instead of lots of tiny libs. The smaller libraries are currently all trivial in size and don't have any dependencies other than samba-util. Having lots of small private libraries is a pain for packaging, and there isn't much advantage in this. commit 6f1b735cc2972ecd3d2acb30ff834273f08628fe Author: Jelmer Vernooij Date: Sat Mar 24 16:41:35 2012 +0100 adt_tree: Avoid WERROR. commit 71d41a015add73e0fb355dd9713e99febd71d46f Author: Jelmer Vernooij Date: Sat Mar 24 16:00:36 2012 +0100 libreplace: Add getpeereid implementation. commit 76bb68fd2b9e09eb4c033417f0f1174f18c04797 Author: Jelmer Vernooij Date: Sat Mar 24 15:44:33 2012 +0100 util_malloc: Remove unused constant. commit 32fd6d639a5f51f1cc5fb0e81356009a2c9df359 Author: Jelmer Vernooij Date: Sat Mar 24 15:26:36 2012 +0100 lib/util: Remove dummy wrapper for getgrgid(). commit 2a82c45f02b9f5683351ccfa1acdf2622938abc9 Author: Jelmer Vernooij Date: Sat Mar 24 15:25:48 2012 +0100 lib/util: Remove dummy wrapper for getgrnam(). commit 43f275008f1d68c6adee461c531d73c65b6b7483 Author: Jelmer Vernooij Date: Sat Mar 24 15:25:05 2012 +0100 lib/util: Remove dummy wrapper for getpwuid(). commit 818e0722e1a730cfa30d911be510641ef23dc446 Author: Jelmer Vernooij Date: Sat Mar 24 15:24:15 2012 +0100 lib/util: Remove dummy wrapper for getpwnam(). commit 3be6258912939fb538d7bcb492483ae2ab52391b Author: Jelmer Vernooij Date: Sat Mar 24 15:23:02 2012 +0100 lib/util: Remove dummy wrappers for setpwent/getpwent/endpwent. commit 14fdc1c5cd4ca0b3f88b2d407d40ba5be7218085 Author: Jelmer Vernooij Date: Sat Mar 24 15:19:09 2012 +0100 lib/util: Move calloc_array and memalign_array to top-level libutil. commit c0c52ac1a40db70d8b19cb8d73ed4759b0a4f905 Author: Jelmer Vernooij Date: Sat Mar 24 15:00:22 2012 +0100 lib/util: Remove prototype for removed sys_memalign. commit 2d5275fae0fd4ea73fba78242185a88845bd0666 Author: Jelmer Vernooij Date: Sat Mar 24 14:58:09 2012 +0100 lib/util: Remove trivial wrapper sys_connect() around connect(). commit 2c9444685d6fd535244638cc51871fd25d1eb1d6 Author: Jelmer Vernooij Date: Sat Mar 24 14:57:47 2012 +0100 cli_pipe: Avoid sys_connect. commit e7cd5291db8df13ca60c081727c7d804308c8737 Author: Jelmer Vernooij Date: Sat Mar 24 14:57:33 2012 +0100 sock_exec: Avoi
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via c352832 Fix bug 8314] - smbd crash with unknown user. from 4898de8 WHATSNEW: Start release notes for 3.5.14. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit c352832e2fadf1207cadef525bf21068f1d1ee1b Author: Jeremy Allison Date: Fri Jul 22 16:40:54 2011 -0700 Fix bug 8314] - smbd crash with unknown user. All other auth modules code with being called with auth_method->private_data being NULL, make the auth_server module cope with this too. Autobuild-User: Jeremy Allison Autobuild-Date: Sat Jul 23 02:55:01 CEST 2011 on sn-devel-104 (cherry picked from commit 1832c9591099be941ef3afe7b0381c4af61f4728) --- Summary of changes: source3/auth/auth_server.c | 15 --- 1 files changed, 12 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 287b50b..bc38041 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -273,14 +273,23 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context const auth_usersupplied_info *user_info, auth_serversupplied_info **server_info) { - struct server_security_state *state = talloc_get_type_abort( - my_private_data, struct server_security_state); - struct cli_state *cli; + struct server_security_state *state = NULL; + struct cli_state *cli = NULL; static bool tested_password_server = False; static bool bad_password_server = False; NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED; bool locally_made_cli = False; + DEBUG(10, ("check_smbserver_security: Check auth for: [%s]\n", + user_info->smb_name)); + + if (my_private_data == NULL) { + DEBUG(10,("check_smbserver_security: " + "password server is not connected\n")); + return NT_STATUS_LOGON_FAILURE; + } + + state = talloc_get_type_abort(my_private_data, struct server_security_state); cli = state->cli; if (cli) { -- Samba Shared Repository