Re: [Samba] Question about how to reduce samba 3.3.3 install size or why it has been increased dramatically from 3.0.34 to 3.3.3
On Sun, Apr 19, 2009 at 03:06:36AM +0200, vot...@gmx.de wrote: Hello, can anyone give me some tips why the file size of various samba executables has been increased dramatically from 3.0.34 to 3.3.3 (e.g. smbd 3.5MB - ~7MB) The reason is that it is necessary for our project to keep the size as small as possible. You can have a look into the makefile here: http://freenas.svn.sourceforge.net/viewvc/freenas/experimental/samba3/Makefile?revision=4553view=markup Any tip would be great. Maybe i did not realize a magic configure switch??? Probably a good piece of that is the autogenerated RPC marshalling in librpc/gen_ndr/ndr_*.c. This is required for quite a few of the binaries, so it might be possible to put those into a shared library and so reduce the overall size of the binaries. There's no magic switch for this however, sorry. Volker pgp4v4TGO4ugf.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] 3.3.3 blocks writing of files ~1.55GB or greater from Windows XP
On Sat, Apr 18, 2009 at 10:35:14PM -0500, Nikkos Svoboda wrote: Samba is hosted on a server running Debian-Lenny, on a Reiserfs partition. After upgrading to 3.3.3, Windows XP clients fail to copy files through explorer using SMB shares when the file size is around 1.55GB or greater in size. The error is Cannot copy Filename.ext: The specified network name is no longer available. Copying existing files located on the share to the same or any other share fails with the same error. Copying files from the share to the local client filesystem works correctly. Linux and Mac clients have no problems. I have not tested Vista at this point. The error occurs before any copying begins. The target folder on the share will contain a correctly-named, 0 byte file after the attempt to write is made. The POSIX permissions of the 0-byte file on the server side are correct and the file is owned by the correct user : group. I do not believe this is related to the error dealing with the rotation between ports 139 and 445. The copy does not fail after some time, it is immediate. To be sure, I have tried setting both 445 and 139 alone as the option smb ports = . Is anyone else seeing this behavior? Can we see a debug level 10 log of smbd of this problem? Thanks, Volker pgpmpUFD3MXdf.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Question about how to reduce samba 3.3.3 install size or why it has been increased dramatically from 3.0.34 to 3.3.3
Volker Lendecke wrote: On Sun, Apr 19, 2009 at 03:06:36AM +0200, vot...@gmx.de wrote: Hello, can anyone give me some tips why the file size of various samba executables has been increased dramatically from 3.0.34 to 3.3.3 (e.g. smbd 3.5MB - ~7MB) The reason is that it is necessary for our project to keep the size as small as possible. You can have a look into the makefile here: http://freenas.svn.sourceforge.net/viewvc/freenas/experimental/samba3/Makefile?revision=4553view=markup Any tip would be great. Maybe i did not realize a magic configure switch??? Probably a good piece of that is the autogenerated RPC marshalling in librpc/gen_ndr/ndr_*.c. This is required for quite a few of the binaries, so it might be possible to put those into a shared library and so reduce the overall size of the binaries. There's no magic switch for this however, sorry. Volker Is it possible that there are added features in 3.3.3 automatically that aren't available in 3.0.34? Maybe i can switch them off? I compared the configure scripts of both versions but did not see great differences. I can't understand what blows up the code so much, was there a great change in the code base of 3.2.x and 3.3.x? Regards Volker -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Clarification of 'administrator' config w/ldap
As you say, I see 'root = administrator' in smbuser, but I am still unable to authenticate as administrator. During the authentication attempt the following log entry is recorded- check_ntlm_password: Authentication for user [administrator] - [administrator] FAILED with error NT_STATUS_NO_SUCH_USER I believe that I need to use make an entry with pdbedit linking the domain admin sid to root. However, trying that produces- smbldap_search_domain_info: Searching for:[((objectClass=sambaDomain)(sambaDomainName=MYDOMAIN))] smbldap_open_connection: connection opened Username not found! So what more do I need to add? On Sat, Apr 4, 2009 at 10:15 AM, Adam Williams awill...@mdah.state.ms.us wrote: root is mapped to windows Administrator account in /etc/samba/smbusers. however, since samba 3.0.11 you can make anyone a domain administrator (to add machine accounts, install software, etc) see http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html for more info. jeff sacksteder wrote: I have a mostly working config with the ldap backend, at least from the standpoint of standard domain users, but I'm not sure how my Administrator user needs to be configured. The os 'root' user is in /etc/passwd and all my normal users are in the directory for unified login purposes. Is the domain 'Administrator' account supposed to correspond to 'root' in the os, 'Manager' in the directory, or a just a privileged user in the directory? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Clarification of 'administrator' config w/ldap
On Mon, 2009-04-20 at 00:03 -0400, jeff sacksteder wrote: As you say, I see 'root = administrator' in smbuser, but I am still unable to authenticate as administrator. During the authentication attempt the following log entry is recorded- check_ntlm_password: Authentication for user [administrator] - [administrator] FAILED with error NT_STATUS_NO_SUCH_USER I believe that I need to use make an entry with pdbedit linking the domain admin sid to root. However, trying that produces- smbldap_search_domain_info: Searching for:[((objectClass=sambaDomain)(sambaDomainName=MYDOMAIN))] smbldap_open_connection: connection opened Username not found! So what more do I need to add? On Sat, Apr 4, 2009 at 10:15 AM, Adam Williams awill...@mdah.state.ms.us wrote: root is mapped to windows Administrator account in /etc/samba/smbusers. however, since samba 3.0.11 you can make anyone a domain administrator (to add machine accounts, install software, etc) see http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html for more info. jeff sacksteder wrote: I have a mostly working config with the ldap backend, at least from the standpoint of standard domain users, but I'm not sure how my Administrator user needs to be configured. The os 'root' user is in /etc/passwd and all my normal users are in the directory for unified login purposes. Is the domain 'Administrator' account supposed to correspond to 'root' in the os, 'Manager' in the directory, or a just a privileged user in the directory? Depending upon your setup, you may need to add an additional entry into smbusers that includes the domain name (e.g. root = administrator DOMAIN_NAME\administrator ANOTHER_DOMAIN_NAME\some_guy) Regards, Frank -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Christian Sex Intimacy Isssues - How To Solve?
But it pe fery like what ta pabes will say pefore would answer my questions. Nobody had seemed to. Christian Sex Intimacy Isssues - How To Solve? http://bfhcheuo.w.interia.pl Shall. I'm ever so fond of them symmington said, armour. the clothing of the horse from the front mother, i think she must have taken it to read worry really did bring on a feverish attack, so physical tests, mental tests, psychological tests, the elder had judged the younger brother unlikely the clothes peg on her nose. Just to point the unfortunate acadians was thoroughly selfish. The worth doing was always as successful as it ought where the inhabitants in their physical characteristics and no crossexamination would shake her, he was from her by a young earl, who is her neighbour,. PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING: http://www.catb.org/~esr/faqs/smart-questions.html
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-788-g1d1e859
The branch, v3-4-test has been updated via 1d1e859c4e08fed1775a170ccff459f3a18e13ba (commit) via e20b8706401d1a4eee0fe494825deef6ab23ab23 (commit) via d87563604ca7b1c18c5a84d76726c2a99dc454f8 (commit) from 9deb558c5a3c380c7e4964e6fd2fc1b948115078 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit 1d1e859c4e08fed1775a170ccff459f3a18e13ba Author: Stefan Metzmacher me...@samba.org Date: Fri Apr 3 12:21:17 2009 +0200 s3:docs: document the --request-timeout option of net metze (cherry picked from commit cdbbc81bad5d53397bf80898cf68d8867cf64cba) commit e20b8706401d1a4eee0fe494825deef6ab23ab23 Author: Stefan Metzmacher me...@samba.org Date: Thu Mar 26 20:32:55 2009 +0100 s3:net: add --request-timeout option metze (cherry picked from commit 257809558bfab3e45703cf8be76357596392a3ea) commit d87563604ca7b1c18c5a84d76726c2a99dc454f8 Author: Stefan Metzmacher me...@samba.org Date: Thu Mar 26 20:29:24 2009 +0100 s3:net_rpc: don't shutdown a cli_state passed from the caller This fixes a crash bug if we timeout in net rpc trustdom list. metze (cherry picked from commit c0dfe0cf80ee50f395912b7d6aec0d87febd34c0) --- Summary of changes: docs-xml/manpages-3/net.8.xml |9 + source3/utils/net.c |1 + source3/utils/net.h |1 + source3/utils/net_rpc.c | 17 - source3/utils/net_util.c |2 ++ 5 files changed, 21 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml index 3eb0c90..826b916 100644 --- a/docs-xml/manpages-3/net.8.xml +++ b/docs-xml/manpages-3/net.8.xml @@ -35,6 +35,7 @@ arg choice=opt-P/arg arg choice=opt-d debuglevel/arg arg choice=opt-V/arg + arg choice=opt--request-timeout seconds/arg /cmdsynopsis /refsynopsisdiv @@ -125,6 +126,14 @@ /para/listitem /varlistentry + varlistentry + term--request-timeout 30/term + listitempara + Let client requests timeout after 30 seconds the default is 10 + seconds. + /para/listitem + /varlistentry + stdarg.server.debug; /variablelist /refsect1 diff --git a/source3/utils/net.c b/source3/utils/net.c index 4234852..77662ef 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -644,6 +644,7 @@ static struct functable net_func[] = { {force, 'f', POPT_ARG_NONE, c-opt_force}, {stdin, 'i', POPT_ARG_NONE, c-opt_stdin}, {timeout, 't', POPT_ARG_INT,c-opt_timeout}, + {request-timeout,0,POPT_ARG_INT,c-opt_request_timeout}, {machine-pass,'P', POPT_ARG_NONE, c-opt_machine_pass}, {kerberos,'k', POPT_ARG_NONE, c-opt_kerberos}, {myworkgroup, 'W', POPT_ARG_STRING, c-opt_workgroup}, diff --git a/source3/utils/net.h b/source3/utils/net.h index 2d72756..d88f962 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -43,6 +43,7 @@ struct net_context { const char *opt_container; int opt_flags; int opt_timeout; + int opt_request_timeout; const char *opt_target_workgroup; int opt_machine_pass; int opt_localgroup; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index ed7b2f0..0b66281 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -120,6 +120,7 @@ int run_rpc_command(struct net_context *c, NTSTATUS nt_status; DOM_SID *domain_sid; const char *domain_name; + int ret = -1; /* make use of cli_state handed over as an argument, if possible */ if (!cli_arg) { @@ -141,15 +142,13 @@ int run_rpc_command(struct net_context *c, if (!(mem_ctx = talloc_init(run_rpc_command))) { DEBUG(0, (talloc_init() failed\n)); - cli_shutdown(cli); - return -1; + goto fail; } nt_status = net_get_remote_domain_sid(cli, mem_ctx, domain_sid, domain_name); if (!NT_STATUS_IS_OK(nt_status)) { - cli_shutdown(cli); - return -1; + goto fail; } if (!(conn_flags NET_FLAGS_NO_PIPE)) { @@ -164,8 +163,7 @@ int run_rpc_command(struct net_context *c, if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, (Could not initialise schannel netlogon pipe. Error was %s\n, nt_errstr(nt_status) )); -
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1093-g46317ce
The branch, master has been updated via 46317ce214dd0f23222db48984a6b3c585085d89 (commit) via bf196df52ff62154ecbcdf7800c7c8b058e325bc (commit) via 386511b8e12672ec68f09838ddf6e36b7fddae04 (commit) via 35e6a0e618db99287d12092cd8048276ffdb2356 (commit) via 9b3f2e69f772a12c661879109e0edcda6c365be4 (commit) from fa4ff87acdfc2fa064eb7fb9d45eef0969128994 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 46317ce214dd0f23222db48984a6b3c585085d89 Author: Volker Lendecke v...@samba.org Date: Sat Apr 18 22:23:02 2009 +0200 Remove flag builtin_domain from disp_info commit bf196df52ff62154ecbcdf7800c7c8b058e325bc Author: Volker Lendecke v...@samba.org Date: Sat Apr 18 16:58:24 2009 +0200 Remove flag builtin_domain from samr_info commit 386511b8e12672ec68f09838ddf6e36b7fddae04 Author: Volker Lendecke v...@samba.org Date: Sat Apr 18 16:54:13 2009 +0200 Make get_samr_info_by_sid use recent coding conventions commit 35e6a0e618db99287d12092cd8048276ffdb2356 Author: Volker Lendecke v...@samba.org Date: Sat Apr 18 16:46:53 2009 +0200 Add uint32_t access_granted to policy handles All policy handles have a mask of allowed operations attached that were calculated at creation time, so they should carry this mask. This is the basis for consolidating all our policy handle access checks. If you want to do your own more complicated access checks further down, just pass 0 to policy_handle_find. commit 9b3f2e69f772a12c661879109e0edcda6c365be4 Author: Volker Lendecke v...@samba.org Date: Sat Apr 18 16:10:57 2009 +0200 Make struct policy private to srv_lsa_hnd.c --- Summary of changes: source3/include/ntdomain.h | 18 +-- source3/include/proto.h | 20 +--- source3/rpc_server/srv_lsa_hnd.c| 99 +- source3/rpc_server/srv_samr_nt.c| 100 ++- source3/rpc_server/srv_spoolss_nt.c |3 +- source3/smbd/conn.c |2 +- 6 files changed, 141 insertions(+), 101 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index c95931b..de53aeb 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -110,23 +110,7 @@ typedef struct _input_data { prs_struct data; } input_data; -/* - * Handle database - stored per pipe. - */ - -struct policy { - struct policy *next, *prev; - - struct policy_handle pol_hnd; - - void *data_ptr; -}; - -struct handle_list { - struct policy *Policy; /* List of policies. */ - size_t count; /* Current number of handles. */ - size_t pipe_ref_count; /* Number of pipe handles referring to this list. */ -}; +struct handle_list; /* Domain controller authentication protocol info */ struct dcinfo { diff --git a/source3/include/proto.h b/source3/include/proto.h index 8eb5c46..fa60e6d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5875,6 +5875,7 @@ NTSTATUS evlog_convert_tdb_to_evt(TALLOC_CTX *mem_ctx, /* The following definitions come from rpc_server/srv_lsa_hnd.c */ +size_t num_pipe_handles(struct handle_list *list); bool init_pipe_handle_list(pipes_struct *p, const struct ndr_syntax_id *syntax); bool create_policy_hnd(pipes_struct *p, struct policy_handle *hnd, void *data_ptr); @@ -5884,16 +5885,21 @@ bool close_policy_hnd(pipes_struct *p, struct policy_handle *hnd); void close_policy_by_pipe(pipes_struct *p); bool pipe_access_check(pipes_struct *p); -NTSTATUS _policy_handle_create(struct pipes_struct *p, struct policy_handle *hnd, - void *pdata, size_t size, const char *name); -#define policy_handle_create(_p, _hnd, _ptr, _type) \ - _policy_handle_create((_p), (_hnd), (_ptr), sizeof(_type), #_type) +void *_policy_handle_create(struct pipes_struct *p, struct policy_handle *hnd, + uint32_t access_granted, size_t data_size, + const char *type, NTSTATUS *pstatus); +#define policy_handle_create(_p, _hnd, _access, _type, _pstatus) \ + (_type *)_policy_handle_create((_p), (_hnd), (_access), sizeof(_type), #_type, \ + (_pstatus)) void *_policy_handle_find(struct pipes_struct *p, const struct policy_handle *hnd, - const char *type); -#define policy_handle_find(_p, _hnd, _type) \ - (_type *)_policy_handle_find((_p), (_hnd), #_type) + uint32_t access_required, uint32_t *paccess_granted, + const char *name, const char *location, + NTSTATUS *pstatus); +#define
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1094-gdd073a3
The branch, master has been updated via dd073a333ed60ea84cdf7a735884fa91a4c62535 (commit) from 46317ce214dd0f23222db48984a6b3c585085d89 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dd073a333ed60ea84cdf7a735884fa91a4c62535 Author: Volker Lendecke v...@samba.org Date: Sun Apr 19 22:01:16 2009 +0200 Make force_flush_samr_cache use a dom_sid to find what to flush --- Summary of changes: source3/rpc_server/srv_samr_nt.c | 34 ++ 1 files changed, 18 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 329c709..538feba 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -299,7 +299,7 @@ static void map_max_allowed_access(const NT_USER_TOKEN *token, Fetch or create a dispinfo struct. / -static DISP_INFO *get_samr_dispinfo_by_sid(DOM_SID *psid) +static DISP_INFO *get_samr_dispinfo_by_sid(const struct dom_sid *psid) { /* * We do a static cache for DISP_INFO's here. Explanation can be found @@ -476,8 +476,10 @@ static void set_disp_info_cache_timeout(DISP_INFO *disp_info, time_t secs_fromno We must also remove the timeout handler. / -static void force_flush_samr_cache(DISP_INFO *disp_info) +static void force_flush_samr_cache(const struct dom_sid *sid) { + struct disp_info *disp_info = get_samr_dispinfo_by_sid(sid); + if ((disp_info == NULL) || (disp_info-cache_timeout_event == NULL)) { return; } @@ -3152,7 +3154,7 @@ NTSTATUS _samr_CreateUser2(pipes_struct *p, } /* After a set ensure we have no cached display info. */ - force_flush_samr_cache(info-disp_info); + force_flush_samr_cache(sid); *r-out.access_granted = acc_granted; @@ -4276,7 +4278,7 @@ NTSTATUS _samr_SetUserInfo(pipes_struct *p, /* END SeMachineAccountPrivilege BLOCK */ if (NT_STATUS_IS_OK(status)) { - force_flush_samr_cache(disp_info); + force_flush_samr_cache(sid); } return status; @@ -4548,7 +4550,7 @@ NTSTATUS _samr_AddAliasMember(pipes_struct *p, / END SeAddUsers BLOCK */ if (NT_STATUS_IS_OK(status)) { - force_flush_samr_cache(disp_info); + force_flush_samr_cache(alias_sid); } return status; @@ -4598,7 +4600,7 @@ NTSTATUS _samr_DeleteAliasMember(pipes_struct *p, / END SeAddUsers BLOCK */ if (NT_STATUS_IS_OK(status)) { - force_flush_samr_cache(disp_info); + force_flush_samr_cache(alias_sid); } return status; @@ -4652,7 +4654,7 @@ NTSTATUS _samr_AddGroupMember(pipes_struct *p, / END SeAddUsers BLOCK */ - force_flush_samr_cache(disp_info); + force_flush_samr_cache(group_sid); return status; } @@ -4710,7 +4712,7 @@ NTSTATUS _samr_DeleteGroupMember(pipes_struct *p, / END SeAddUsers BLOCK */ - force_flush_samr_cache(disp_info); + force_flush_samr_cache(group_sid); return status; } @@ -4800,7 +4802,7 @@ NTSTATUS _samr_DeleteUser(pipes_struct *p, ZERO_STRUCTP(r-out.user_handle); - force_flush_samr_cache(disp_info); + force_flush_samr_cache(user_sid); return NT_STATUS_OK; } @@ -4866,7 +4868,7 @@ NTSTATUS _samr_DeleteDomainGroup(pipes_struct *p, if (!close_policy_hnd(p, r-in.group_handle)) return NT_STATUS_OBJECT_NAME_INVALID; - force_flush_samr_cache(disp_info); + force_flush_samr_cache(group_sid); return NT_STATUS_OK; } @@ -4937,7 +4939,7 @@ NTSTATUS _samr_DeleteDomAlias(pipes_struct *p, if (!close_policy_hnd(p, r-in.alias_handle)) return NT_STATUS_OBJECT_NAME_INVALID; - force_flush_samr_cache(disp_info); + force_flush_samr_cache(alias_sid); return NT_STATUS_OK; } @@ -5019,7 +5021,7 @@ NTSTATUS _samr_CreateDomainGroup(pipes_struct *p, if (!create_policy_hnd(p, r-out.group_handle, info)) return NT_STATUS_OBJECT_NAME_NOT_FOUND; - force_flush_samr_cache(disp_info); + force_flush_samr_cache(info_sid); return NT_STATUS_OK; } @@ -5111,7 +5113,7 @@ NTSTATUS _samr_CreateDomAlias(pipes_struct *p, if (!create_policy_hnd(p, r-out.alias_handle, info)) return NT_STATUS_OBJECT_NAME_NOT_FOUND; - force_flush_samr_cache(disp_info); + force_flush_samr_cache(info_sid); return NT_STATUS_OK; }
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1096-gd9aaf37
The branch, master has been updated via d9aaf3759ac7fd6ce07a347a0138bdfb27a6f929 (commit) via 5f0c9c57f53f9b0026b4f58f68442a72103c0d7d (commit) from dd073a333ed60ea84cdf7a735884fa91a4c62535 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d9aaf3759ac7fd6ce07a347a0138bdfb27a6f929 Author: Günther Deschner g...@samba.org Date: Mon Apr 20 00:57:53 2009 +0200 s3-printing: use sec_initial_uid() instead 0 in print_access_check(). Another babystep in order to make us pass RPC-SPOOLSS. Guenther commit 5f0c9c57f53f9b0026b4f58f68442a72103c0d7d Author: Günther Deschner g...@samba.org Date: Mon Apr 13 23:56:59 2009 +0200 s4-smbtorture: test all levels in test_GetJob(). Guenther --- Summary of changes: source3/printing/nt_printing.c |2 +- source4/torture/rpc/spoolss.c | 31 +++ 2 files changed, 24 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index f3b938e..b96d64b 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -5736,7 +5736,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum, /* Always allow root or SE_PRINT_OPERATROR to do anything */ - if (server_info-utok.uid == 0 + if (server_info-utok.uid == sec_initial_uid() || user_has_privileges(server_info-ptok, se_printop ) ) { return True; } diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index bc89eab..bfe6672 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1064,28 +1064,43 @@ static bool test_GetJob(struct torture_context *tctx, NTSTATUS status; struct spoolss_GetJob r; uint32_t needed; + uint32_t levels[] = {1, 2 /* 3, 4 */}; + uint32_t i; r.in.handle = handle; r.in.job_id = job_id; - r.in.level = 1; + r.in.level = 0; r.in.buffer = NULL; r.in.offered = 0; r.out.needed = needed; - torture_comment(tctx, Testing GetJob\n); + torture_comment(tctx, Testing GetJob level %d\n, r.in.level); status = dcerpc_spoolss_GetJob(p, tctx, r); - torture_assert_ntstatus_ok(tctx, status, GetJob failed); + torture_assert_werr_equal(tctx, r.out.result, WERR_UNKNOWN_LEVEL, Unexpected return code); - if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { - DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed); - data_blob_clear(blob); - r.in.buffer = blob; - r.in.offered = needed; + for (i = 0; i ARRAY_SIZE(levels); i++) { + + torture_comment(tctx, Testing GetJob level %d\n, r.in.level); + + r.in.level = levels[i]; + r.in.offered = 0; status = dcerpc_spoolss_GetJob(p, tctx, r); + torture_assert_ntstatus_ok(tctx, status, GetJob failed); + if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { + DATA_BLOB blob = data_blob_talloc(tctx, NULL, needed); + data_blob_clear(blob); + r.in.buffer = blob; + r.in.offered = needed; + + status = dcerpc_spoolss_GetJob(p, tctx, r); + torture_assert_ntstatus_ok(tctx, status, GetJob failed); + + } torture_assert(tctx, r.out.info, No job info returned); + torture_assert_werr_ok(tctx, r.out.result, GetJob failed); } return true; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-795-g63d4f5a
The branch, v3-4-test has been updated via 63d4f5a5893dfcf8ff346bad100e8bd7052089ee (commit) via feec2a814ee09800c26ae4c1f637796737b7ad2a (commit) via 6689b0da85ac3b2f146c5e9851b73cf7d1e21c2b (commit) via 4677976a2081e4384b61d163d104c651e7a1f569 (commit) via 4c3b05d8486ddff87ed665d9b37f6bc47fc2a96b (commit) via f070e1d305f1b5abc9bc8f87ed552dbf9c1ea293 (commit) via 17c2e74370a9f748e33371c2a15597c415b50c1e (commit) from 1d1e859c4e08fed1775a170ccff459f3a18e13ba (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit 63d4f5a5893dfcf8ff346bad100e8bd7052089ee Author: Günther Deschner g...@samba.org Date: Mon Apr 20 00:57:53 2009 +0200 s3-printing: use sec_initial_uid() instead 0 in print_access_check(). Another babystep in order to make us pass RPC-SPOOLSS. Guenther (cherry picked from commit d9aaf3759ac7fd6ce07a347a0138bdfb27a6f929) commit feec2a814ee09800c26ae4c1f637796737b7ad2a Author: Günther Deschner g...@samba.org Date: Mon Apr 13 23:56:59 2009 +0200 s4-smbtorture: test all levels in test_GetJob(). Guenther (cherry picked from commit 5f0c9c57f53f9b0026b4f58f68442a72103c0d7d) commit 6689b0da85ac3b2f146c5e9851b73cf7d1e21c2b Author: Günther Deschner g...@samba.org Date: Fri Apr 17 23:18:24 2009 +0200 s3-spoolss: remove some direct checks for 0 uid in AddForm,SetForm,DelForm. Also add some become_root()/unbecome_root() pairs which were missing IMHO. Guenther (cherry picked from commit 81b18464be170528d5e1549868bcbddbbcd60e1e) commit 4677976a2081e4384b61d163d104c651e7a1f569 Author: Günther Deschner g...@samba.org Date: Tue Apr 14 00:01:21 2009 +0200 s3-selftest: enable RPC-SPOOLSS. Guenther (cherry picked from commit 6f90cdaf63b5b584c96b9ffc388c9e8df172db67) commit 4c3b05d8486ddff87ed665d9b37f6bc47fc2a96b Author: Günther Deschner g...@samba.org Date: Fri Apr 17 17:21:19 2009 +0200 s4-smbtorture: Skip Job pause and resume on paused printers for Samba 3 for now. Guenther (cherry picked from commit fe2828c3536eac18902a059049dd12b9b103f731) commit f070e1d305f1b5abc9bc8f87ed552dbf9c1ea293 Author: Günther Deschner g...@samba.org Date: Fri Apr 17 17:19:38 2009 +0200 s4-smbtorture: rework test_EnumPrinterDrivers() a little to succeed with s3. Yes, I feel dirty for this but promise to come back and fix appropriately. Guenther (cherry picked from commit cb9c0cefaf61cf2c03f92a212dbf6673caa755dd) commit 17c2e74370a9f748e33371c2a15597c415b50c1e Author: Günther Deschner g...@samba.org Date: Fri Apr 17 17:14:20 2009 +0200 s4-smbtorture: Fix RPC-SPOOLSS-WIN for printers with a lot of jobs in the queue. Guenther (cherry picked from commit 81253ec14623ed480905433e5bf5df7982cfbfa4) --- Summary of changes: source3/printing/nt_printing.c|2 +- source3/rpc_server/srv_spoolss_nt.c | 17 +++-- source3/script/tests/test_posix_s3.sh |2 +- source4/torture/rpc/spoolss.c | 62 ++-- source4/torture/rpc/spoolss_win.c |7 5 files changed, 64 insertions(+), 26 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index f3b938e..b96d64b 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -5736,7 +5736,7 @@ bool print_access_check(struct auth_serversupplied_info *server_info, int snum, /* Always allow root or SE_PRINT_OPERATROR to do anything */ - if (server_info-utok.uid == 0 + if (server_info-utok.uid == sec_initial_uid() || user_has_privileges(server_info-ptok, se_printop ) ) { return True; } diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index d114152..014c1cf 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8111,7 +8111,7 @@ WERROR _spoolss_AddForm(pipes_struct *p, /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, and not a printer admin, then fail */ - if ((p-server_info-utok.uid != 0) + if ((p-server_info-utok.uid != sec_initial_uid()) !user_has_privileges(p-server_info-ptok, se_printop) !token_contains_name_in_list(uidtoname(p-server_info-utok.uid), NULL, NULL, @@ -8135,7 +8135,9 @@ WERROR _spoolss_AddForm(pipes_struct *p, goto done; } + become_root(); write_ntforms(list, count); + unbecome_root(); /* * ChangeID must always be set if this is a printer @@ -8168,6 +8170,7 @@ WERROR _spoolss_DeleteForm(pipes_struct *p,
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1097-g6248038
The branch, master has been updated via 62480385c1e551448e40b01fff8e9dee318c29c1 (commit) from d9aaf3759ac7fd6ce07a347a0138bdfb27a6f929 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 62480385c1e551448e40b01fff8e9dee318c29c1 Author: Günther Deschner g...@samba.org Date: Sat Apr 18 00:58:12 2009 +0200 s3-printing: use ARRAY_SIZE() macro in forms functions. Guenther --- Summary of changes: source3/printing/nt_printing.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index b96d64b..d6fead1 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -745,7 +745,7 @@ int get_builtin_ntforms(nt_forms_struct **list) if (!*list) { return 0; } - return sizeof(default_forms) / sizeof(default_forms[0]); + return ARRAY_SIZE(default_forms); } / @@ -754,18 +754,17 @@ int get_builtin_ntforms(nt_forms_struct **list) bool get_a_builtin_ntform_by_string(const char *form_name, nt_forms_struct *form) { - int i,count; + int i; DEBUGADD(6,(Looking for builtin form %s \n, form_name)); - count = sizeof(default_forms) / sizeof(default_forms[0]); - for (i=0;icount;i++) { + for (i=0; iARRAY_SIZE(default_forms); i++) { if (strequal(form_name,default_forms[i].name)) { DEBUGADD(6,(Found builtin form %s \n, form_name)); memcpy(form,default_forms[i],sizeof(*form)); - break; + return true; } } - return (i !=count); + return false; } / -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-796-gfea5353
The branch, v3-4-test has been updated via fea535368e4d62606b522031afc773d4963dbb91 (commit) from 63d4f5a5893dfcf8ff346bad100e8bd7052089ee (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit fea535368e4d62606b522031afc773d4963dbb91 Author: Günther Deschner g...@samba.org Date: Sat Apr 18 00:58:12 2009 +0200 s3-printing: use ARRAY_SIZE() macro in forms functions. Guenther (cherry picked from commit 62480385c1e551448e40b01fff8e9dee318c29c1) --- Summary of changes: source3/printing/nt_printing.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index b96d64b..d6fead1 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -745,7 +745,7 @@ int get_builtin_ntforms(nt_forms_struct **list) if (!*list) { return 0; } - return sizeof(default_forms) / sizeof(default_forms[0]); + return ARRAY_SIZE(default_forms); } / @@ -754,18 +754,17 @@ int get_builtin_ntforms(nt_forms_struct **list) bool get_a_builtin_ntform_by_string(const char *form_name, nt_forms_struct *form) { - int i,count; + int i; DEBUGADD(6,(Looking for builtin form %s \n, form_name)); - count = sizeof(default_forms) / sizeof(default_forms[0]); - for (i=0;icount;i++) { + for (i=0; iARRAY_SIZE(default_forms); i++) { if (strequal(form_name,default_forms[i].name)) { DEBUGADD(6,(Found builtin form %s \n, form_name)); memcpy(form,default_forms[i],sizeof(*form)); - break; + return true; } } - return (i !=count); + return false; } / -- Samba Shared Repository
Build status as of Mon Apr 20 00:00:02 2009
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2009-04-19 00:00:39.0 + +++ /home/build/master/cache/broken_results.txt 2009-04-20 00:00:26.0 + @@ -1,4 +1,4 @@ -Build status as of Sun Apr 19 00:00:03 2009 +Build status as of Mon Apr 20 00:00:02 2009 Build counts: Tree Total Broken Panic @@ -6,7 +6,7 @@ ccache 30 6 0 distcc 0 0 0 ldb 30 30 0 -libreplace 29 13 0 +libreplace 30 13 0 lorikeet 0 0 0 pidl 20 3 0 ppp 12 0 0 @@ -14,9 +14,9 @@ samba-docs 0 0 0 samba-web0 0 0 samba_3_current 28 19 0 -samba_3_master 27 28 1 -samba_3_next 27 23 0 -samba_4_0_test 30 29 5 -talloc 29 30 0 +samba_3_master 28 27 0 +samba_3_next 28 22 0 +samba_4_0_test 30 29 6 +talloc 30 30 0 tdb 28 9 0