svn commit: samba r7630 - in branches/SAMBA_4_0/source/libnet: .
Author: tpot Date: 2005-06-16 06:56:48 + (Thu, 16 Jun 2005) New Revision: 7630 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7630 Log: Unused variable. Modified: branches/SAMBA_4_0/source/libnet/libnet_user.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/libnet_user.c === --- branches/SAMBA_4_0/source/libnet/libnet_user.c 2005-06-16 06:55:55 UTC (rev 7629) +++ branches/SAMBA_4_0/source/libnet/libnet_user.c 2005-06-16 06:56:48 UTC (rev 7630) @@ -30,7 +30,6 @@ NTSTATUS status; union libnet_rpc_connect cn; union libnet_find_pdc fp; - struct dcerpc_pipe *pipe; struct libnet_rpc_domain_open dom_io; struct libnet_rpc_useradd user_io;
svn commit: samba r7629 - in branches/SAMBA_4_0/source/libnet: .
Author: tpot Date: 2005-06-16 06:55:55 + (Thu, 16 Jun 2005) New Revision: 7629 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7629 Log: Unused labels. Modified: branches/SAMBA_4_0/source/libnet/libnet_share.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/libnet_share.c === --- branches/SAMBA_4_0/source/libnet/libnet_share.c 2005-06-16 06:55:07 UTC (rev 7628) +++ branches/SAMBA_4_0/source/libnet/libnet_share.c 2005-06-16 06:55:55 UTC (rev 7629) @@ -113,7 +113,6 @@ r->in.server_name, nt_errstr(status)); } -disconnect: talloc_free(c.standard.out.dcerpc_pipe); return status; @@ -153,7 +152,6 @@ r->in.server_name, nt_errstr(status)); } -disconnect: talloc_free(c.standard.out.dcerpc_pipe); return status;
svn commit: samba r7628 - in branches/SAMBA_4_0/source/torture/libnet: .
Author: tpot Date: 2005-06-16 06:55:07 + (Thu, 16 Jun 2005) New Revision: 7628 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7628 Log: Unused variables. Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c Changeset: Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_user.c === --- branches/SAMBA_4_0/source/torture/libnet/libnet_user.c 2005-06-16 06:39:41 UTC (rev 7627) +++ branches/SAMBA_4_0/source/torture/libnet/libnet_user.c 2005-06-16 06:55:07 UTC (rev 7628) @@ -99,12 +99,8 @@ { NTSTATUS status; const char *binding; - struct dcerpc_pipe *p; TALLOC_CTX *mem_ctx; - BOOL ret = True; - struct policy_handle h; struct libnet_context *ctx; - struct cli_credentials *cred; struct libnet_CreateUser req; mem_ctx = talloc_init("test_createuser");
svn commit: samba r7627 - in branches/SAMBA_4_0/source/lib: .
Author: tpot Date: 2005-06-16 06:39:41 + (Thu, 16 Jun 2005) New Revision: 7627 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7627 Log: Fix warning in unused (?) function. Modified: branches/SAMBA_4_0/source/lib/util_file.c Changeset: Modified: branches/SAMBA_4_0/source/lib/util_file.c === --- branches/SAMBA_4_0/source/lib/util_file.c 2005-06-16 05:39:40 UTC (rev 7626) +++ branches/SAMBA_4_0/source/lib/util_file.c 2005-06-16 06:39:41 UTC (rev 7627) @@ -115,7 +115,7 @@ Blanks at the start or end of a line are stripped. The string will be allocated if s2 is NULL / -char *fgets_slash(char *s2,int maxlen,FILE *f) +char *fgets_slash(char *s2,int maxlen,XFILE *f) { char *s=s2; int len = 0;
svn commit: samba-docs r648 - in trunk/Samba3-ByExample: .
Author: jht Date: 2005-06-16 06:00:56 + (Thu, 16 Jun 2005) New Revision: 648 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=648 Log: Fix. Modified: trunk/Samba3-ByExample/SBE-UpgradingSamba.xml Changeset: Modified: trunk/Samba3-ByExample/SBE-UpgradingSamba.xml === --- trunk/Samba3-ByExample/SBE-UpgradingSamba.xml 2005-06-16 04:54:09 UTC (rev 647) +++ trunk/Samba3-ByExample/SBE-UpgradingSamba.xml 2005-06-16 06:00:56 UTC (rev 648) @@ -293,7 +293,7 @@ Domain security information, which includes the domain SID, can be obtained from Samba-2.2.x systems by executing: -&rootprompt; rpcclient lsaquery -Uroot%password +&rootprompt; rpcclient hostname lsaquery -Uroot%password This can also be done with Samba-3 by executing:
svn commit: samba r7626 - in branches/SAMBA_4_0/source: include lib/socket libcli/ldap libcli/util torture/ldap
Author: tridge Date: 2005-06-16 05:39:40 + (Thu, 16 Jun 2005) New Revision: 7626 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7626 Log: a new ldap client library. Main features are: - hooked into events system, so requests can be truly async and won't interfere with other processing happening at the same time - uses NTSTATUS codes for errors (previously errors were mostly ignored). In a similar fashion to the DOS error handling, I have reserved a range of the NTSTATUS code 32 bit space for LDAP error codes, so a function can return a LDAP error code in a NTSTATUS - much cleaner packet handling Added: branches/SAMBA_4_0/source/lib/socket/connect.c branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c branches/SAMBA_4_0/source/libcli/ldap/ldap_client.h branches/SAMBA_4_0/source/libcli/ldap/ldap_msg.c Removed: branches/SAMBA_4_0/source/libcli/ldap/ldap_ldif.c Modified: branches/SAMBA_4_0/source/include/nt_status.h branches/SAMBA_4_0/source/include/structs.h branches/SAMBA_4_0/source/lib/socket/config.mk branches/SAMBA_4_0/source/lib/socket/socket.c branches/SAMBA_4_0/source/lib/socket/socket.h branches/SAMBA_4_0/source/libcli/ldap/config.mk branches/SAMBA_4_0/source/libcli/ldap/ldap.c branches/SAMBA_4_0/source/libcli/ldap/ldap.h branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c branches/SAMBA_4_0/source/libcli/util/nterr.c branches/SAMBA_4_0/source/torture/ldap/basic.c branches/SAMBA_4_0/source/torture/ldap/common.c Changeset: Sorry, the patch is too large (2666 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7626
svn commit: lorikeet r339 - in trunk/heimdal: . doc/standardisation kdc kuser lib/krb5
Author: abartlet Date: 2005-06-16 05:15:49 + (Thu, 16 Jun 2005) New Revision: 339 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=339 Log: Update to Heimdal 20050616. This includes fixes for shadowed variable warnings - thanks lha! Andrew Bartlett Added: trunk/heimdal/doc/standardisation/draft-zhu-kerb-enctype-nego-01.txt trunk/heimdal/lib/krb5/test_mem.c Modified: trunk/heimdal/ChangeLog trunk/heimdal/kdc/kerberos5.c trunk/heimdal/kdc/main.c trunk/heimdal/kuser/kinit.c trunk/heimdal/lib/krb5/Makefile.am trunk/heimdal/lib/krb5/cache.c trunk/heimdal/lib/krb5/get_for_creds.c trunk/heimdal/lib/krb5/get_in_tkt.c trunk/heimdal/lib/krb5/init_creds_pw.c trunk/heimdal/lib/krb5/krb5-protos.h trunk/heimdal/lib/krb5/log.c trunk/heimdal/lib/krb5/verify_krb5_conf.c Changeset: Sorry, the patch is too large (999 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=339
svn commit: samba-docs r647 - in trunk/manpages-3: .
Author: jht Date: 2005-06-16 04:54:09 + (Thu, 16 Jun 2005) New Revision: 647 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=647 Log: Fixups. Modified: trunk/manpages-3/smb.conf.5.xml Changeset: Sorry, the patch is too large (921 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=647
svn commit: samba-docs r646 - in trunk/smbdotconf/logon: .
Author: jht Date: 2005-06-16 04:53:53 + (Thu, 16 Jun 2005) New Revision: 646 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=646 Log: Fixups. Modified: trunk/smbdotconf/logon/abortshutdownscript.xml trunk/smbdotconf/logon/shutdownscript.xml Changeset: Modified: trunk/smbdotconf/logon/abortshutdownscript.xml === --- trunk/smbdotconf/logon/abortshutdownscript.xml 2005-06-16 03:34:42 UTC (rev 645) +++ trunk/smbdotconf/logon/abortshutdownscript.xml 2005-06-16 04:53:53 UTC (rev 646) @@ -1,7 +1,7 @@ http://www.samba.org/samba/DTD/samba-doc";> This a full path name to a script called by smbd Modified: trunk/smbdotconf/logon/shutdownscript.xml === --- trunk/smbdotconf/logon/shutdownscript.xml 2005-06-16 03:34:42 UTC (rev 645) +++ trunk/smbdotconf/logon/shutdownscript.xml 2005-06-16 04:53:53 UTC (rev 646) @@ -1,6 +1,6 @@ http://www.samba.org/samba/DTD/samba-doc";>
svn commit: samba-docs r645 - in trunk/Samba3-HOWTO: .
Author: jht Date: 2005-06-16 03:34:42 + (Thu, 16 Jun 2005) New Revision: 645 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=645 Log: Fix typos. Modified: trunk/Samba3-HOWTO/TOSHARG-BDC.xml trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml trunk/Samba3-HOWTO/TOSHARG-glossary.xml trunk/Samba3-HOWTO/index.xml Changeset: Modified: trunk/Samba3-HOWTO/TOSHARG-BDC.xml === --- trunk/Samba3-HOWTO/TOSHARG-BDC.xml 2005-06-16 02:47:55 UTC (rev 644) +++ trunk/Samba3-HOWTO/TOSHARG-BDC.xml 2005-06-16 03:34:42 UTC (rev 645) @@ -382,7 +382,7 @@ Where a WINS server is not used, broadcast name registrations alone must suffice. Refer to -Network Browsing,Discussion +Network Browsing,Discussion for more information regarding TCP/IP network protocols and how SMB/CIFS names are handled. Modified: trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml === --- trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml2005-06-16 02:47:55 UTC (rev 644) +++ trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml2005-06-16 03:34:42 UTC (rev 645) @@ -430,7 +430,7 @@ ink. Unknown data are tagged by CUPS as MIME type: application/octet-stream and not allowed to go to the printer. By default, you can only send other (known) MIME types raw. Sending data raw means that CUPS does not try to convert them and passes them to the printer - untouched (see the CUPS Printing Chapter for more background explanations). + untouched (see the CUPS Printing Chapter for more background explanations). @@ -458,7 +458,7 @@ drivers onto the Samba server first ( share). For a discussion on how to deposit printer drivers on the Samba host (so the Windows clients can download and use them via - Point'n'Print), please refer to the Classic Printing + Point'n'Print), please refer to the Classic Printing chapter of this Samba-3 HOWTO Collection. There you will find a description or reference to three methods of preparing the client drivers on the Samba server: @@ -2480,7 +2480,7 @@ rpcclientsetdriver Once you have successfully downloaded the CUPS PostScript driver to a client, you can easily switch all -printers to this one by proceeding as described in Classical Printing +printers to this one by proceeding as described in Classical Printing Support. Either change a driver for an existing printer by running the Printer Properties dialog, or use rpcclient with the setdriver subcommand. Modified: trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml === --- trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml 2005-06-16 02:47:55 UTC (rev 644) +++ trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml 2005-06-16 03:34:42 UTC (rev 645) @@ -20,7 +20,7 @@ -The book that you have before you focuses on a particular standardized way of doing something – hence, it is a +The book that you have before you focuses on a particular standardized way of doing something hence, it is a book about a standard. The most important thing to keep in mind about a standard is the rationale for its creation. Standards are created not for technical reasons, not for business reasons, but for a deeper and much more compelling reason. Standards are created and used to allow people to communicate in a meaningful way. Modified: trunk/Samba3-HOWTO/TOSHARG-glossary.xml === --- trunk/Samba3-HOWTO/TOSHARG-glossary.xml 2005-06-16 02:47:55 UTC (rev 644) +++ trunk/Samba3-HOWTO/TOSHARG-glossary.xml 2005-06-16 03:34:42 UTC (rev 645) @@ -154,8 +154,6 @@ - - Local Master Browser LMB Modified: trunk/Samba3-HOWTO/index.xml === --- trunk/Samba3-HOWTO/index.xml2005-06-16 02:47:55 UTC (rev 644) +++ trunk/Samba3-HOWTO/index.xml2005-06-16 03:34:42 UTC (rev 645) @@ -151,7 +151,7 @@ - + http://www.gnu.org/licenses/gpl.xml"/>
svn commit: samba-docs r644 - in trunk/Samba3-HOWTO: .
Author: jht Date: 2005-06-16 02:47:55 + (Thu, 16 Jun 2005) New Revision: 644 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=644 Log: Another edit and addon. This is a work in progress. Added: trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml Modified: trunk/Samba3-HOWTO/index.xml Changeset: Added: trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml === --- trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml 2005-06-16 02:10:11 UTC (rev 643) +++ trunk/Samba3-HOWTO/TOSHARG-foreword-cargill.xml 2005-06-16 02:47:55 UTC (rev 644) @@ -0,0 +1,79 @@ + +http://www.samba.org/samba/DTD/samba-doc";> + +Foreword + + +When John first asked me to write an introductory piece for his latest book, I was somewhat mystified as to +why he chose me. A conversation with John provided some of the rationale, and he left it to me to fill in the +rest of the story. So, if you are willing to endure a little bit of background, I will +provide the part of the story that John wouldn't provide. + + + +I am the Director of Corporate Standards at Sun Microsystems, and manage Sun's standards portfolio. Before +that, I was the Director of Standards at Netscape, which was when I met John. Before Sun, there was Digital +Equipment Corporation, also standards. I've written several books on standards, and tend to observe (and +occasionally help) the technical and business trends that drive standardization as a discipline. I tend to see +standardization as a management tool, not as a technical discipline – and this is part of the rationale that +John provided. + + + +The book that you have before you focuses on a particular standardized way of doing something – hence, it is a +book about a standard. The most important thing to keep in mind about a standard is the rationale for its +creation. Standards are created not for technical reasons, not for business reasons, but for a deeper and much +more compelling reason. Standards are created and used to allow people to communicate in a meaningful way. +Every standard, if it is a true standard, has as its entire (and only) goal set the increasing of relevant +communication between people. + + + +This primary goal cannot be met however, unless the standard is documented. I have been involved in too many +standardization efforts when it became apparent that everybody knows was the dominant +emotion of those providing documentation. They of the ever present they +say and they know are the bane of good standards. If they +know, why are you doing a standard? + + + +A good standard survives because people know how to use it. People know how to use a +standard when it is so transparent, so obvious, and so easy that it become invisible. And a standard become +invisible only when the documentation describing how to deploy it is clear, unambiguous, and correct. These +three elements must be present for a standard to be useful, allowing communication and interaction between two +separate and distinct entities to occur without obvious effort. As you read this book, look for the evidence +of these three characteristics and notice how they are seamlessly woven into John's text. Clarity and +unambiguity without correctness provide a technical nightmare. Correctness and clarity +with ambiguity create maybe bits, and correctness and unambiguity without clarity provide +a muddle through scenario. + + + +And this is the rest of the story that John couldn't (or wouldn't) bring himself to +state. This book provides a clear, concise, unambiguous, and technically valid presentation of Samba to make +it useful to a user to someone who wants to use the standard to increase communication and the capability +for communication between two or more entities whether person-machine, machine-machine, or person-person. +The intent of this book is not to convince anyone of any agenda political, technical, or social. The intent +is to provide documentation for users who need to know about Samba, how to use it, and how to get on with +their primary responsibilities. While there is pride on John's part because of the tremendous success of +Samba, he write for the person who needs a tool to accomplish a particular job, and who has selected Samba to +be that tool. + + + +The book is a monument to John's perseverance and dedication to Samba and in my opinion to the goal of +standardization. By writing this book, John has provided the users of Samba those that want to deploy it to +make things better a clear, easy, and ultimately valuable resource. Additionally, he has increased the +understanding and utility of a highly useful standard, and for this, as much as for the documentation, he is +owed a debt of gratitude by those of us who rely on standards to make our lives more manageable. + + + + + Carl Cargill, Senior Director + Corporate Standardization, The Office of the CTO +
svn commit: samba-docs r643 - in trunk/Samba3-HOWTO: .
Author: jht Date: 2005-06-16 02:10:11 + (Thu, 16 Jun 2005) New Revision: 643 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=643 Log: PHPTR Edit 2. More to come. Modified: trunk/Samba3-HOWTO/TOSHARG-Bugs.xml trunk/Samba3-HOWTO/TOSHARG-Compiling.xml trunk/Samba3-HOWTO/TOSHARG-DNS-DHCP-Configuration.xml trunk/Samba3-HOWTO/TOSHARG-Diagnosis.xml trunk/Samba3-HOWTO/TOSHARG-HighAvailability.xml trunk/Samba3-HOWTO/TOSHARG-LargeFile.xml trunk/Samba3-HOWTO/TOSHARG-NT4Migration.xml trunk/Samba3-HOWTO/TOSHARG-Other-Clients.xml trunk/Samba3-HOWTO/TOSHARG-Portability.xml trunk/Samba3-HOWTO/TOSHARG-Problems.xml trunk/Samba3-HOWTO/TOSHARG-SWAT.xml trunk/Samba3-HOWTO/TOSHARG-Speed.xml trunk/Samba3-HOWTO/TOSHARG-glossary.xml trunk/Samba3-HOWTO/TOSHARG-upgrading-to-3.0.xml Changeset: Sorry, the patch is too large (3317 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=643
svn commit: samba-docs r642 - in trunk/Samba3-HOWTO: .
Author: jht Date: 2005-06-16 01:33:35 + (Thu, 16 Jun 2005) New Revision: 642 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=642 Log: Stage 1 of PHPTR Edits. Modified: trunk/Samba3-HOWTO/TOSHARG-AccessControls.xml trunk/Samba3-HOWTO/TOSHARG-AdvancedNetworkAdmin.xml trunk/Samba3-HOWTO/TOSHARG-BDC.xml trunk/Samba3-HOWTO/TOSHARG-Backup.xml trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml trunk/Samba3-HOWTO/TOSHARG-DomainMember.xml trunk/Samba3-HOWTO/TOSHARG-FastStart.xml trunk/Samba3-HOWTO/TOSHARG-Group-Mapping.xml trunk/Samba3-HOWTO/TOSHARG-IDMAP.xml trunk/Samba3-HOWTO/TOSHARG-Install.xml trunk/Samba3-HOWTO/TOSHARG-Integrating-with-Windows.xml trunk/Samba3-HOWTO/TOSHARG-InterdomainTrusts.xml trunk/Samba3-HOWTO/TOSHARG-NetworkBrowsing.xml trunk/Samba3-HOWTO/TOSHARG-PAM.xml trunk/Samba3-HOWTO/TOSHARG-PDC.xml trunk/Samba3-HOWTO/TOSHARG-Passdb.xml trunk/Samba3-HOWTO/TOSHARG-PolicyMgmt.xml trunk/Samba3-HOWTO/TOSHARG-Printing.xml trunk/Samba3-HOWTO/TOSHARG-Problems.xml trunk/Samba3-HOWTO/TOSHARG-ProfileMgmt.xml trunk/Samba3-HOWTO/TOSHARG-RightsAndPriviliges.xml trunk/Samba3-HOWTO/TOSHARG-Securing.xml trunk/Samba3-HOWTO/TOSHARG-ServerType.xml trunk/Samba3-HOWTO/TOSHARG-StandAloneServer.xml trunk/Samba3-HOWTO/TOSHARG-TheNetCommand.xml trunk/Samba3-HOWTO/TOSHARG-Unicode.xml trunk/Samba3-HOWTO/TOSHARG-Winbind.xml trunk/Samba3-HOWTO/TOSHARG-WindowsClientConfig.xml trunk/Samba3-HOWTO/TOSHARG-glossary.xml trunk/Samba3-HOWTO/TOSHARG-locking.xml trunk/Samba3-HOWTO/TOSHARG-msdfs.xml trunk/Samba3-HOWTO/index.xml Changeset: Sorry, the patch is too large (25117 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=642
svn commit: samba r7625 - in trunk/source: printing rpc_server services smbd
Author: jerry Date: 2005-06-16 01:21:44 + (Thu, 16 Jun 2005) New Revision: 7625 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7625 Log: merging svcctl fixed from SAMBA_3_0 ( abd the adddriver() fixes Modified: trunk/source/printing/nt_printing.c trunk/source/rpc_server/srv_spoolss_nt.c trunk/source/rpc_server/srv_svcctl_nt.c trunk/source/services/services_db.c trunk/source/smbd/reply.c trunk/source/smbd/server.c Changeset: Sorry, the patch is too large (431 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7625
svn commit: samba r7624 - in branches/SAMBA_3_0/source: rpc_server services smbd
Author: jerry Date: 2005-06-16 00:46:43 + (Thu, 16 Jun 2005) New Revision: 7624 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7624 Log: * removed unmatched tdb_lock_by_string() call (should fix build farm issues) * comment out services.tdb code until I finish rewriting it Modified: branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c branches/SAMBA_3_0/source/services/services_db.c branches/SAMBA_3_0/source/smbd/server.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2005-06-15 22:48:15 UTC (rev 7623) +++ branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2005-06-16 00:46:43 UTC (rev 7624) @@ -445,9 +445,9 @@ num_int_services = 0; - num_int_services = num_internal_services(); + /* num_int_services = num_internal_services(); */ - num_ext_services = num_external_services(); + /* num_ext_services = num_external_services(); */ if ( !(services = TALLOC_ARRAY(p->mem_ctx, ENUM_SERVICES_STATUS, num_int_services+num_ext_services )) ) return WERR_NOMEM; @@ -458,7 +458,7 @@ DEBUG(8,("_svcctl_enum_services_status: Got %d internal services\n", num_int_services)); } - ext_result=enum_external_services(p->mem_ctx, &services, num_int_services, &num_ext_services); + /* ext_result=enum_external_services(p->mem_ctx, &services, num_int_services, &num_ext_services); */ if (W_ERROR_IS_OK(ext_result)) { DEBUG(8,("_svcctl_enum_services_status: Got %d external services\n", num_ext_services)); Modified: branches/SAMBA_3_0/source/services/services_db.c === --- branches/SAMBA_3_0/source/services/services_db.c2005-06-15 22:48:15 UTC (rev 7623) +++ branches/SAMBA_3_0/source/services/services_db.c2005-06-16 00:46:43 UTC (rev 7624) @@ -21,6 +21,8 @@ #include "includes.h" +#if 0 + /* backend database routines for services.tdb */ #define SERVICEDB_VERSION_V1 1 /* Will there be more? */ @@ -90,7 +92,6 @@ num_services = 0; } else { pstrcpy(keystring,"EXTERNAL_SERVICES"); - tdb_lock_bystring(service_tdb, keystring, 0); key_data = tdb_fetch_bystring(service_tdb, keystring); if ((key_data.dptr != NULL) && (key_data.dsize != 0)) { @@ -98,7 +99,6 @@ external_services_string[key_data.dsize] = 0; DEBUG(8,("enum_external_services: services list is %s, size is %d\n",external_services_string,key_data.dsize)); } - tdb_unlock_bystring(service_tdb, keystring); } svc_list = str_list_make(external_services_string,NULL); @@ -147,14 +147,12 @@ DEBUG(8,("enum_external_services: service database is not open!!!\n")); } else { pstrcpy(keystring,"EXTERNAL_SERVICES"); - tdb_lock_bystring(service_tdb, keystring, 0); key_data = tdb_fetch_bystring(service_tdb, keystring); if ((key_data.dptr != NULL) && (key_data.dsize != 0)) { strncpy(external_services_string,key_data.dptr,key_data.dsize); external_services_string[key_data.dsize] = 0; DEBUG(8,("enum_external_services: services list is %s, size is %d\n",external_services_string,key_data.dsize)); } - tdb_unlock_bystring(service_tdb, keystring); } svc_list = str_list_make(external_services_string,NULL); @@ -275,7 +273,6 @@ num_services = 0; } else { pstrcpy(keystring,"INTERNAL_SERVICES"); - tdb_lock_bystring(service_tdb, keystring, 0); key_data = tdb_fetch_bystring(service_tdb, keystring); if ((key_data.dptr != NULL) && (key_data.dsize != 0)) { @@ -283,7 +280,6 @@ internal_services_string[key_data.dsize] = 0; DEBUG(8,("enum_internal_services: services list is %s, size is %d\n",internal_services_string,key_data.dsize)); } - tdb_unlock_bystring(service_tdb, keystring); } svc_list = str_list_make(internal_services_string,NULL); @@ -473,7 +469,6 @@ tdb_store_bystring(stdb,keystring,string_tdb_data(si->description),TDB_REPLACE); pstr_sprintf(keystring,"SERVICE/%s/SHORTDESC", service_name); - tdb_lock_bystring(stdb, keystring, 0); if (si->shortdescription && *si->shortdescription) tdb_store_bystring(stdb,keystring,string_tdb_data(si->shortdescription),TDB_REPLACE); else @@ -539,10 +534,8 @@ svcname++; } pstrcpy(keystring,"EXTERNAL
Build status as of Thu Jun 16 00:00:02 2005
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2005-06-15 00:00:40.0 + +++ /home/build/master/cache/broken_results.txt 2005-06-16 00:00:22.0 + @@ -1,26 +1,26 @@ -Build status as of Wed Jun 15 00:00:02 2005 +Build status as of Thu Jun 16 00:00:02 2005 Build counts: Tree Total Broken Panic -ccache 40 8 0 -distcc 40 1 0 -lorikeet-heimdal 36 14 0 -ppp 24 2 0 -rsync40 3 0 +ccache 43 8 0 +distcc 43 4 0 +lorikeet-heimdal 38 16 0 +ppp 25 1 0 +rsync43 2 0 samba0 0 0 samba-docs 0 0 0 -samba4 43 40 2 -samba_3_044 39 0 -talloc 36 18 0 -tdb 37 37 0 +samba4 46 42 2 +samba_3_047 36 0 +talloc 39 21 0 +tdb 40 40 0 Currently broken builds: Host Tree Compiler Status aix1 lorikeet-heimdal gccok/ 2/?/? -aix1 samba4 gcc 77/?/?/? -aix1 samba_3_0gcc 77/?/?/? +aix1 samba4 gccok/ 2/?/? +aix1 samba_3_0gccok/ 137/?/? aix1 talloc gccok/ok/ 2/? -aix1 tdb gcc 77/?/?/? +aix1 tdb gccok/ 2/?/? oehmesrs6k ccache cc ok/ok/ 2/? oehmesrs6k distcc cc ok/ 2/?/? oehmesrs6k lorikeet-heimdal cc ok/ 2/?/? @@ -34,104 +34,111 @@ lithiumtdb gcc 2/?/?/? fusberta lorikeet-heimdal gccok/ 2/?/? fusberta samba4 gccok/ 2/?/? -fusberta samba_3_0gccok/ok/ok/ 26 fusberta tdb gcc 2/?/?/? samba-s390 lorikeet-heimdal gccok/ 2/?/? samba-s390 samba4 gccok/ 2/?/? -samba-s390 samba_3_0gccok/ok/ok/ 18 +samba-s390 samba_3_0gccok/ok/ok/ 27 samba-s390 talloc gccok/ 2/?/? samba-s390 tdb gcc 2/?/?/? tuxsamba4 gccok/ok/ok/ 106 tuxsamba_3_0gccok/ok/ok/ 31 tuxtdb gcc 2/?/?/? -rhonwynppp gccok/ 2/?/? -rhonwynrsyncgcc 1/?/?/? -rhonwynsamba4 gcc 77/?/?/? -rhonwynsamba_3_0gcc 77/?/?/? -rhonwynsamba4 gcc-4.0 77/?/?/? -rhonwynsamba_3_0gcc-4.0 77/?/?/? -rhonwynsamba4 tcc 1/?/?/? +rhonwynsamba4 gccok/ 137/?/? +rhonwynsamba_3_0gccok/ 137/?/? +rhonwynsamba4 gcc-4.0ok/ 137/?/? +rhonwynsamba_3_0gcc-4.0ok/ 137/?/? +rhonwynsamba4 tccok/ 2/?/? quango samba4 gccok/ok/ok/ 153/PANIC -quango samba_3_0gccok/ok/ok/ 31 +quango samba_3_0gccok/ok/ok/ 38 quango tdb gcc 2/?/?/? superego samba4 gccok/ok/ok/ 153/PANIC -superego samba_3_0gccok/ok/ok/ 31 +superego samba_3_0gccok/ok/ok/ 38 superego tdb gcc 2/?/?/? cl012 lorikeet-heimdal gccok/ok/ok/ 2 -cl012 samba4 gccok/ok/ok/ 67 -cl012 samba_3_0gccok/ok/ok/ 31 +cl012 samba4 gccok/ok/ok/ 1 cl012 tdb gcc 2/?/?/? dev4-003 lorikeet-heimdal gccok/ 2/?/? -dev4-003 samba4 gccok/ok/ok/ 66 -dev4-003 samba_3_0gccok/ok/ok/ 31 dev4-003 tdb gcc 2/?/?/? -berks samba4 gccok/ok/ok/ 113 -berks samba_3_0gccok/ok/ok/ 31 +berks lorikeet-heimdal gccok/ 2/?/? +berks samba4 gccok/ 2/?/? +berks samba_3_0gccok/ 2/?/? +berks talloc gccok/ok/ 2/? berks tdb gcc 2/?/?/? -yowiee samba4 gccok/ok/ok/ 67 +yowiee samba4 gccok/ok/ok/ 23 yowiee samba_3_0gcc 1/?/?/? yowiee talloc gccok/ok/ 2/? yowiee tdb gcc 2/?/?/? shelob samba4 gccok/ok/ok/ 2 shelob tdb gcc
svn commit: samba r7623 - in trunk/source/smbd: .
Author: jra Date: 2005-06-15 22:48:15 + (Wed, 15 Jun 2005) New Revision: 7623 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7623 Log: Get the write behind working reliably. I now know how to correctly use aio_error and aio_suspend. Jeremy. Modified: trunk/source/smbd/aio.c Changeset: Modified: trunk/source/smbd/aio.c === --- trunk/source/smbd/aio.c 2005-06-15 21:45:09 UTC (rev 7622) +++ trunk/source/smbd/aio.c 2005-06-15 22:48:15 UTC (rev 7623) @@ -297,7 +297,7 @@ } if (outstanding_aio_calls >= AIO_PENDING_SIZE) { - DEBUG(10,("schedule_aio_write_and_X: Already have %d aio activities outstanding.\n", + DEBUG(3,("schedule_aio_write_and_X: Already have %d aio activities outstanding.\n", outstanding_aio_calls )); DEBUG(10,("schedule_aio_write_and_X: failed to schedule aio_write for file %s, offset %.0f, len = %u (mid = %u)\n", fsp->fsp_name, (double)startpos, (unsigned int)numtowrite, (unsigned int)aio_ex->mid )); @@ -492,6 +492,35 @@ } / + Handle any aio completion. Returns True if finished (and sets *perr if err was non-zero), + False if not. +*/ + +static BOOL handle_aio_completed(struct aio_extra *aio_ex, int *perr) +{ + int err; + + /* Ensure the operation has really completed. */ + if (SMB_VFS_AIO_ERROR(aio_ex->fsp, &aio_ex->acb) == EINPROGRESS) { + DEBUG(10,( "handle_aio_completed: operation mid %u still in process for file %s\n", + aio_ex->mid, aio_ex->fsp->fsp_name )); + return False; + } + + if (aio_ex->read_req) { + err = handle_aio_read_complete(aio_ex); + } else { + err = handle_aio_write_complete(aio_ex); + } + + if (err) { + *perr = err; /* Only save non-zero errors. */ + } + + return True; +} + +/ Handle any aio completion inline. Returns non-zero errno if fail or zero if all ok. */ @@ -513,7 +542,6 @@ /* Drain all the complete aio_reads. */ for (i = 0; i < signals_received; i++) { - int err = 0; uint16 mid = aio_pending_array[i]; files_struct *fsp = NULL; struct aio_extra *aio_ex = find_aio_ex(mid); @@ -533,23 +561,13 @@ continue; } - /* Ensure the operation has really completed. */ - if (SMB_VFS_AIO_ERROR(fsp,&aio_ex->acb) == EINPROGRESS) { - DEBUG( 3,( "process_aio_queue: operation still in process for file %s\n", fsp->fsp_name )); + if (!handle_aio_completed(aio_ex, &ret)) { continue; } - if (aio_ex->read_req) { - err = handle_aio_read_complete(aio_ex); - } else { - err = handle_aio_write_complete(aio_ex); - } - - if (err) { - ret = err; /* Only save non-zero errors. */ - } delete_aio_ex(aio_ex); } + outstanding_aio_calls -= signals_received; signals_received = 0; BlockSignals(False, RT_SIGNAL_AIO); @@ -557,21 +575,23 @@ } / - We're doing write behind and the client closed the file. Wait up to 15 seconds + We're doing write behind and the client closed the file. Wait up to 30 seconds (my arbitrary choice) for the aio to complete. Return 0 if all writes completed, errno to return if not. */ +#define SMB_TIME_FOR_AIO_COMPLETE_WAIT 29 + BOOL wait_for_aio_completion(files_struct *fsp) { struct aio_extra *aio_ex; const SMB_STRUCT_AIOCB **aiocb_list; int aio_completion_count = 0; time_t start_time = time(NULL); - int seconds_left = 15; + int seconds_left; int ret = 0; - for (seconds_left = 15; seconds_left >= 0;) { + for (seconds_left = SMB_TIME_FOR_AIO_COMPLETE_WAIT; seconds_left >= 0;) { int err = 0; int i; struct timespec ts; @@ -601,31 +621,45 @@ } } - /* Now wait up to 15 seconds for completion. */ + /* Now wait up to seconds_left for completion. */ ts.tv_sec = seconds_left; ts.tv_nsec = 0; - DEBUG(3,("wait_for_
svn commit: samba-docs r641 - in trunk/Samba3-HOWTO: .
Author: jht Date: 2005-06-15 22:28:17 + (Wed, 15 Jun 2005) New Revision: 641 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=641 Log: Update. Modified: trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml trunk/Samba3-HOWTO/TOSHARG-TheNetCommand.xml Changeset: Modified: trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml === --- trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml2005-06-14 19:55:00 UTC (rev 640) +++ trunk/Samba3-HOWTO/TOSHARG-CUPS-printing.xml2005-06-15 22:28:17 UTC (rev 641) @@ -3180,7 +3180,7 @@ - + Avoiding Critical PostScript Driver Settings on the Client Modified: trunk/Samba3-HOWTO/TOSHARG-TheNetCommand.xml === --- trunk/Samba3-HOWTO/TOSHARG-TheNetCommand.xml2005-06-14 19:55:00 UTC (rev 640) +++ trunk/Samba3-HOWTO/TOSHARG-TheNetCommand.xml2005-06-15 22:28:17 UTC (rev 641) @@ -1487,7 +1487,7 @@ Please refer to the net command man page for information regarding cache management. - + Other Miscellaneous Operations
svn commit: samba r7622 - in trunk/source/smbd: .
Author: jra Date: 2005-06-15 21:45:09 + (Wed, 15 Jun 2005) New Revision: 7622 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7622 Log: Turns out aio_error must return != EINPROGRESS before you can safely call aio_return. Jeremy Modified: trunk/source/smbd/aio.c Changeset: Modified: trunk/source/smbd/aio.c === --- trunk/source/smbd/aio.c 2005-06-15 21:03:43 UTC (rev 7621) +++ trunk/source/smbd/aio.c 2005-06-15 21:45:09 UTC (rev 7622) @@ -373,16 +373,8 @@ int outsize; char *outbuf = aio_ex->outbuf; char *data = smb_buf(outbuf); - ssize_t nread; + ssize_t nread = SMB_VFS_AIO_RETURN(aio_ex->fsp,&aio_ex->acb); - if (aio_ex->fsp == NULL) { - /* file was closed whilst I/O was outstanding. Just ignore. */ - DEBUG( 3,( "handle_aio_read_complete: file closed whilst read outstanding.\n")); - srv_cancel_sign_response(aio_ex->mid); - return 0; - } - - nread = SMB_VFS_AIO_RETURN(aio_ex->fsp,&aio_ex->acb); if (nread < 0) { /* We're relying here on the fact that if the fd is closed then the aio will complete and aio_return @@ -436,17 +428,8 @@ files_struct *fsp = aio_ex->fsp; char *outbuf = aio_ex->outbuf; ssize_t numtowrite = aio_ex->acb.aio_nbytes; - ssize_t nwritten; + ssize_t nwritten = SMB_VFS_AIO_RETURN(fsp,&aio_ex->acb); - if (fsp == NULL) { - /* file was closed whilst I/O was outstanding. Just ignore. */ - DEBUG( 3,( "handle_aio_read_complete: file closed whilst read outstanding.\n")); - srv_cancel_sign_response(aio_ex->mid); - return 0; - } - - nwritten = SMB_VFS_AIO_RETURN(fsp,&aio_ex->acb); - if (fsp->aio_write_behind) { if (nwritten != numtowrite) { if (nwritten == -1) { @@ -532,6 +515,7 @@ for (i = 0; i < signals_received; i++) { int err = 0; uint16 mid = aio_pending_array[i]; + files_struct *fsp = NULL; struct aio_extra *aio_ex = find_aio_ex(mid); if (!aio_ex) { @@ -541,6 +525,20 @@ continue; } + fsp = aio_ex->fsp; + if (fsp == NULL) { + /* file was closed whilst I/O was outstanding. Just ignore. */ + DEBUG( 3,( "process_aio_queue: file closed whilst aio outstanding.\n")); + srv_cancel_sign_response(mid); + continue; + } + + /* Ensure the operation has really completed. */ + if (SMB_VFS_AIO_ERROR(fsp,&aio_ex->acb) == EINPROGRESS) { + DEBUG( 3,( "process_aio_queue: operation still in process for file %s\n", fsp->fsp_name )); + continue; + } + if (aio_ex->read_req) { err = handle_aio_read_complete(aio_ex); } else {
svn commit: samba r7621 - in branches/SAMBA_4_0/source/ntvfs/common: .
Author: vlendec Date: 2005-06-15 21:03:43 + (Wed, 15 Jun 2005) New Revision: 7621 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7621 Log: Trivial reformatting while trying to understand share modes. Still survives smbtorture *DENY* . Volker Modified: branches/SAMBA_4_0/source/ntvfs/common/opendb.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/common/opendb.c === --- branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2005-06-15 19:28:14 UTC (rev 7620) +++ branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2005-06-15 21:03:43 UTC (rev 7621) @@ -156,8 +156,6 @@ */ static BOOL share_conflict(struct odb_entry *e1, struct odb_entry *e2) { -#define CHECK_MASK(am, sa, right, share) if (((am) & (right)) && !((sa) & (share))) return True - if (e1->pending || e2->pending) return False; /* if either open involves no read.write or delete access then @@ -184,26 +182,23 @@ return False; } - CHECK_MASK(e1->access_mask, e2->share_access, - SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA, - NTCREATEX_SHARE_ACCESS_WRITE); - CHECK_MASK(e2->access_mask, e1->share_access, - SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA, - NTCREATEX_SHARE_ACCESS_WRITE); +#define CHECK_MASK(am, right, sa, share) \ + if (((am) & (right)) && !((sa) & (share))) return True + + CHECK_MASK(e1->access_mask, SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA, + e2->share_access, NTCREATEX_SHARE_ACCESS_WRITE); + CHECK_MASK(e2->access_mask, SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA, + e1->share_access, NTCREATEX_SHARE_ACCESS_WRITE); - CHECK_MASK(e1->access_mask, e2->share_access, - SEC_FILE_READ_DATA | SEC_FILE_EXECUTE, - NTCREATEX_SHARE_ACCESS_READ); - CHECK_MASK(e2->access_mask, e1->share_access, - SEC_FILE_READ_DATA | SEC_FILE_EXECUTE, - NTCREATEX_SHARE_ACCESS_READ); + CHECK_MASK(e1->access_mask, SEC_FILE_READ_DATA | SEC_FILE_EXECUTE, + e2->share_access, NTCREATEX_SHARE_ACCESS_READ); + CHECK_MASK(e2->access_mask, SEC_FILE_READ_DATA | SEC_FILE_EXECUTE, + e1->share_access, NTCREATEX_SHARE_ACCESS_READ); - CHECK_MASK(e1->access_mask, e2->share_access, - SEC_STD_DELETE, - NTCREATEX_SHARE_ACCESS_DELETE); - CHECK_MASK(e2->access_mask, e1->share_access, - SEC_STD_DELETE, - NTCREATEX_SHARE_ACCESS_DELETE); + CHECK_MASK(e1->access_mask, SEC_STD_DELETE, + e2->share_access, NTCREATEX_SHARE_ACCESS_DELETE); + CHECK_MASK(e2->access_mask, SEC_STD_DELETE, + e1->share_access, NTCREATEX_SHARE_ACCESS_DELETE); /* if a delete is pending then a second open is not allowed */ if ((e1->create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE) ||
svn commit: samba r7620 - in branches/SAMBA_3_0/source: printing smbd
Author: jerry Date: 2005-06-15 19:28:14 + (Wed, 15 Jun 2005) New Revision: 7620 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7620 Log: when adding a new printer driver, we should copy the files (not move) to the W32X86/{2,3}/ directory. Printmig.exe copies the driver files for all drivers to print$/W32X86 and the calls AddPrinterDriver() for each driver. If we move the file, then adding a driver which shares a file with a previous driver will fail. I can now restore drivers in bulk to a Samba 3 server. Modified: branches/SAMBA_3_0/source/printing/nt_printing.c branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/printing/nt_printing.c === --- branches/SAMBA_3_0/source/printing/nt_printing.c2005-06-15 18:50:05 UTC (rev 7619) +++ branches/SAMBA_3_0/source/printing/nt_printing.c2005-06-15 19:28:14 UTC (rev 7620) @@ -1307,10 +1307,16 @@ driver_unix_convert(driverpath,conn,NULL,&bad_path,&st); + if ( !vfs_file_exist( conn, driverpath, &st ) ) { + *perr = WERR_BADFILE; + goto error_exit; + } + fsp = open_file_shared(conn, driverpath, &st, - SET_DENY_MODE(DENY_NONE)|SET_OPEN_MODE(DOS_OPEN_RDONLY), - (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), - FILE_ATTRIBUTE_NORMAL, INTERNAL_OPEN_ONLY, &access_mode, &action); + SET_DENY_MODE(DENY_NONE)|SET_OPEN_MODE(DOS_OPEN_RDONLY), + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), + FILE_ATTRIBUTE_NORMAL, INTERNAL_OPEN_ONLY, &access_mode, &action); + if (!fsp) { DEBUG(3,("get_correct_cversion: Can't open file [%s], errno = %d\n", driverpath, errno)); @@ -1351,8 +1357,8 @@ driverpath, major, minor)); } -DEBUG(10,("get_correct_cversion: Driver file [%s] cversion = %d\n", - driverpath, cversion)); + DEBUG(10,("get_correct_cversion: Driver file [%s] cversion = %d\n", + driverpath, cversion)); close_file(fsp, True); close_cnum(conn, user->vuid); @@ -1429,9 +1435,8 @@ * NT 4: cversion=2 * NT2K: cversion=3 */ - if ((driver->cversion = get_correct_cversion( architecture, - driver->driverpath, user, &err)) == -1) - return err; + if ((driver->cversion = get_correct_cversion( architecture, driver->driverpath, user, &err)) == -1) + return err; return WERR_OK; } @@ -1493,8 +1498,9 @@ * NT 4: cversion=2 * NT2K: cversion=3 */ + if ((driver->version = get_correct_cversion(architecture, driver->driverpath, user, &err)) == -1) - return err; + return err; return WERR_OK; } @@ -1580,6 +1586,7 @@ SMB_STRUCT_STAT st; int ver = 0; int i; + int err; memset(inbuf, '\0', sizeof(inbuf)); memset(outbuf, '\0', sizeof(outbuf)); @@ -1657,18 +1664,13 @@ if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) { NTSTATUS status; driver_unix_convert(new_name, conn, NULL, &bad_path, &st); - status = rename_internals(conn, new_name, old_name, 0, True); - if (!NT_STATUS_IS_OK(status)) { + if ( !copy_file(new_name, old_name, conn, FILE_EXISTS_TRUNCATE|FILE_CREATE_IF_NOT_EXIST, 0, False, &err) ) { DEBUG(0,("move_driver_to_download_area: Unable to rename [%s] to [%s]\n", new_name, old_name)); *perr = ntstatus_to_werror(status); - unlink_internals(conn, 0, new_name); ver = -1; } - } else { - driver_unix_convert(new_name, conn, NULL, &bad_path, &st); - unlink_internals(conn, 0, new_name); - } + } } if (driver->datafile && strlen(driver->datafile)) { @@ -1678,17 +1680,12 @@ if (ver != -1 && (ver=file_version_is_newer(conn, new_name, old_name)) > 0) { NTSTATUS status; driver_unix_convert(new_name, conn, NULL, &bad_path, &st); - status = rename_internals(conn, new_name, old_name, 0, True); - if (!NT_STATUS_IS_OK(status)) { + if (
svn commit: samba r7619 - in trunk/source/smbd: .
Author: jra Date: 2005-06-15 18:50:05 + (Wed, 15 Jun 2005) New Revision: 7619 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7619 Log: Typo.. Jeremy Modified: trunk/source/smbd/reply.c Changeset: Modified: trunk/source/smbd/reply.c === --- trunk/source/smbd/reply.c 2005-06-15 18:49:43 UTC (rev 7618) +++ trunk/source/smbd/reply.c 2005-06-15 18:50:05 UTC (rev 7619) @@ -3774,7 +3774,7 @@ } if(all_veto_files) { - RewindDir(dir_hnd); + RewindDir(dir_hnd,&dirpos); while ((dname = ReadDirName(dir_hnd,&dirpos))) { pstring fullname;
svn commit: samba r7618 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2005-06-15 18:49:43 + (Wed, 15 Jun 2005) New Revision: 7618 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7618 Log: Typo... Jeremy. Modified: branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/reply.c === --- branches/SAMBA_3_0/source/smbd/reply.c 2005-06-15 18:37:34 UTC (rev 7617) +++ branches/SAMBA_3_0/source/smbd/reply.c 2005-06-15 18:49:43 UTC (rev 7618) @@ -3781,7 +3781,7 @@ } if(all_veto_files) { - RewindDir(dir_hnd); + RewindDir(dir_hnd,&dirpos); while ((dname = ReadDirName(dir_hnd,&dirpos))) { pstring fullname;
svn commit: samba r7617 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2005-06-15 18:37:34 + (Wed, 15 Jun 2005) New Revision: 7617 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7617 Log: Fix for bug #2801 - delete veto files was broken with the new large directory code. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/dir.c branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dir.c === --- branches/SAMBA_3_0/source/smbd/dir.c2005-06-15 18:37:29 UTC (rev 7616) +++ branches/SAMBA_3_0/source/smbd/dir.c2005-06-15 18:37:34 UTC (rev 7617) @@ -,13 +,29 @@ } /*** + Rewind to the start. +/ + +void RewindDir(struct smb_Dir *dirp, long *poffset) +{ + SMB_VFS_REWINDDIR(dirp->conn, dirp->dir); + dirp->file_number = 0; + dirp->offset = 0; + *poffset = 0; +} + +/*** Seek a dir. / void SeekDir(struct smb_Dir *dirp, long offset) { if (offset != dirp->offset) { - SMB_VFS_SEEKDIR(dirp->conn, dirp->dir, offset); + if (offset == 0) { + RewindDir(dirp, &offset); + } else { + SMB_VFS_SEEKDIR(dirp->conn, dirp->dir, offset); + } dirp->offset = offset; } } Modified: branches/SAMBA_3_0/source/smbd/reply.c === --- branches/SAMBA_3_0/source/smbd/reply.c 2005-06-15 18:37:29 UTC (rev 7616) +++ branches/SAMBA_3_0/source/smbd/reply.c 2005-06-15 18:37:34 UTC (rev 7617) @@ -3768,7 +3768,7 @@ struct smb_Dir *dir_hnd = OpenDir(conn, directory); if(dir_hnd != NULL) { - long dirpos = TellDir(dir_hnd); + long dirpos = 0; while ((dname = ReadDirName(dir_hnd,&dirpos))) { if((strcmp(dname, ".") == 0) || (strcmp(dname, "..")==0)) continue; @@ -3781,7 +3781,7 @@ } if(all_veto_files) { - SeekDir(dir_hnd,dirpos); + RewindDir(dir_hnd); while ((dname = ReadDirName(dir_hnd,&dirpos))) { pstring fullname;
svn commit: samba r7616 - in trunk/source/smbd: .
Author: jra Date: 2005-06-15 18:37:29 + (Wed, 15 Jun 2005) New Revision: 7616 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7616 Log: Fix for bug #2801 - delete veto files was broken with the new large directory code. Jeremy. Modified: trunk/source/smbd/dir.c trunk/source/smbd/reply.c Changeset: Modified: trunk/source/smbd/dir.c === --- trunk/source/smbd/dir.c 2005-06-15 17:15:01 UTC (rev 7615) +++ trunk/source/smbd/dir.c 2005-06-15 18:37:29 UTC (rev 7616) @@ -,13 +,29 @@ } /*** + Rewind to the start. +/ + +void RewindDir(struct smb_Dir *dirp, long *poffset) +{ + SMB_VFS_REWINDDIR(dirp->conn, dirp->dir); + dirp->file_number = 0; + dirp->offset = 0; + *poffset = 0; +} + +/*** Seek a dir. / void SeekDir(struct smb_Dir *dirp, long offset) { if (offset != dirp->offset) { - SMB_VFS_SEEKDIR(dirp->conn, dirp->dir, offset); + if (offset == 0) { + RewindDir(dirp, &offset); + } else { + SMB_VFS_SEEKDIR(dirp->conn, dirp->dir, offset); + } dirp->offset = offset; } } Modified: trunk/source/smbd/reply.c === --- trunk/source/smbd/reply.c 2005-06-15 17:15:01 UTC (rev 7615) +++ trunk/source/smbd/reply.c 2005-06-15 18:37:29 UTC (rev 7616) @@ -3761,7 +3761,7 @@ struct smb_Dir *dir_hnd = OpenDir(conn, directory); if(dir_hnd != NULL) { - long dirpos = TellDir(dir_hnd); + long dirpos = 0; while ((dname = ReadDirName(dir_hnd,&dirpos))) { if((strcmp(dname, ".") == 0) || (strcmp(dname, "..")==0)) continue; @@ -3774,7 +3774,7 @@ } if(all_veto_files) { - SeekDir(dir_hnd,dirpos); + RewindDir(dir_hnd); while ((dname = ReadDirName(dir_hnd,&dirpos))) { pstring fullname;
svn commit: samba r7615 - in branches/SAMBA_4_0/source: dsdb/samdb lib lib/ldb/tests
Author: idra Date: 2005-06-15 17:15:01 + (Wed, 15 Jun 2005) New Revision: 7615 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7615 Log: fix the build and simplify gendb_search_dn Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c branches/SAMBA_4_0/source/lib/gendb.c branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c === --- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2005-06-15 17:03:34 UTC (rev 7614) +++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c2005-06-15 17:15:01 UTC (rev 7615) @@ -52,8 +52,8 @@ int i, count; va_start(ap, format); - count = gendb_search_v(sam_ldb, mem_ctx, basedn, res, attrs, - format, ap); + count = gendb_search_v(sam_ldb, mem_ctx, basedn, + res, attrs, format, ap); va_end(ap); i=0; Modified: branches/SAMBA_4_0/source/lib/gendb.c === --- branches/SAMBA_4_0/source/lib/gendb.c 2005-06-15 17:03:34 UTC (rev 7614) +++ branches/SAMBA_4_0/source/lib/gendb.c 2005-06-15 17:15:01 UTC (rev 7615) @@ -35,22 +35,27 @@ const char *format, va_list ap) _PRINTF_ATTRIBUTE(6,0) { + enum ldb_scope scope = LDB_SCOPE_SUBTREE; char *expr = NULL; int count; - vasprintf(&expr, format, ap); - if (expr == NULL) { - return -1; + if (format) { + vasprintf(&expr, format, ap); + if (expr == NULL) { + return -1; + } + } else { + scope = LDB_SCOPE_BASE; } *res = NULL; - count = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, attrs, res); + count = ldb_search(ldb, basedn, scope, expr, attrs, res); if (*res) talloc_steal(mem_ctx, *res); DEBUG(4,("gendb_search_v: %s %s -> %d (%s)\n", -basedn?basedn:"NULL", expr, count, +basedn?basedn:"NULL", expr?expr:"NULL", count, count==-1?ldb_errstring(ldb):"OK")); free(expr); @@ -79,31 +84,13 @@ } int gendb_search_dn(struct ldb_context *ldb, - TALLOC_CTX *mem_ctx, - const char *dn, - struct ldb_message ***res, - const char * const *attrs) +TALLOC_CTX *mem_ctx, +const char *dn, +struct ldb_message ***res, +const char * const *attrs) { - va_list ap; - int count; - - *res = NULL; - - count = ldb_search(ldb, dn, LDB_SCOPE_BASE, "", attrs, res); - - if (count > 1) { - DEBUG(1, ("DB Corruption ? - Found more then one entry for dn: %s", dn)); - return -1; - } - - if (*res) talloc_steal(mem_ctx, *res); - - DEBUG(4,("gendb_search_dn: %s -> %d (%s)\n", -dn, count, count==-1?ldb_errstring(ldb):"OK")); - - return count; + return gendb_search(ldb, mem_ctx, dn, res, attrs, NULL); } - /* setup some initial ldif in a ldb Modified: branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh === --- branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2005-06-15 17:03:34 UTC (rev 7614) +++ branches/SAMBA_4_0/source/lib/ldb/tests/test-generic.sh 2005-06-15 17:15:01 UTC (rev 7615) @@ -39,7 +39,7 @@ $VALGRIND bin/ldbsearch '(&(uid=uham)(uid=uha*)(title=*))' uid || exit 1 $VALGRIND bin/ldbsearch '((' uid && exit 1 $VALGRIND bin/ldbsearch '(objectclass=)' uid || exit 1 -$VALGRIND bin/ldbsearch 'dn=cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=US' uid || exit 1 +$VALGRIND bin/ldbsearch -b 'cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=US' -s base "" sn || exit 1 echo "Starting ldbtest indexed" time $VALGRIND bin/ldbtest -r 1000 -s 5000 || exit 1
svn commit: samba r7614 - in branches/SAMBA_3_0/source: printing rpc_server
Author: jerry Date: 2005-06-15 17:03:34 + (Wed, 15 Jun 2005) New Revision: 7614 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7614 Log: convert move_driver_to_download_area() to return WERROR in order to provide better error messages to clients when a AddPrinterDriver[Ex]() call fails Modified: branches/SAMBA_3_0/source/printing/nt_printing.c branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c Changeset: Modified: branches/SAMBA_3_0/source/printing/nt_printing.c === --- branches/SAMBA_3_0/source/printing/nt_printing.c2005-06-15 16:32:12 UTC (rev 7613) +++ branches/SAMBA_3_0/source/printing/nt_printing.c2005-06-15 17:03:34 UTC (rev 7614) @@ -1561,7 +1561,7 @@ / / -BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, +WERROR move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, struct current_user *user, WERROR *perr) { NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver; @@ -1592,7 +1592,7 @@ driver = &converted_driver; } else { DEBUG(0,("move_driver_to_download_area: Unknown info level (%u)\n", (unsigned int)level )); - return False; + return WERR_UNKNOWN_LEVEL; } architecture = get_short_archi(driver->environment); @@ -1611,7 +1611,7 @@ if (conn == NULL) { DEBUG(0,("move_driver_to_download_area: Unable to connect\n")); *perr = ntstatus_to_werror(nt_status); - return False; + return WERR_NO_SUCH_SHARE; } /* @@ -1620,7 +1620,7 @@ if (!become_user(conn, conn->vuid)) { DEBUG(0,("move_driver_to_download_area: Can't become user!\n")); - return False; + return WERR_ACCESS_DENIED; } /* @@ -1778,7 +1778,7 @@ close_cnum(conn, user->vuid); unbecome_user(); - return ver == -1 ? False : True; + return ver != -1 ? WERR_OK : WERR_UNKNOWN_PRINTER_DRIVER; } / Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2005-06-15 16:32:12 UTC (rev 7613) +++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c 2005-06-15 17:03:34 UTC (rev 7614) @@ -7628,9 +7628,7 @@ goto done; DEBUG(5,("Moving driver to final destination\n")); - if(!move_driver_to_download_area(driver, level, &user, &err)) { - if (W_ERROR_IS_OK(err)) - err = WERR_ACCESS_DENIED; + if( !W_ERROR_IS_OK(err = move_driver_to_download_area(driver, level, &user, &err)) ) { goto done; }
svn commit: samba r7613 - in branches/SAMBA_3_0/source/rpc_server: .
Author: jerry Date: 2005-06-15 16:32:12 + (Wed, 15 Jun 2005) New Revision: 7613 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7613 Log: small changes to _svcctl_open_service() and create_open_service_handle() to prevent invalid service names from being accepted; printmig.exe now migrates drivers successfully Modified: branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2005-06-15 15:55:06 UTC (rev 7612) +++ branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2005-06-15 16:32:12 UTC (rev 7613) @@ -171,6 +171,7 @@ const char *service, uint32 access_granted ) { SERVICE_INFO *info = NULL; + WERROR result = WERR_OK; if ( !(info = SMB_MALLOC_P( SERVICE_INFO )) ) return WERR_NOMEM; @@ -186,17 +187,24 @@ info->type = SVC_HANDLE_IS_SERVICE; - if ( !(info->name = SMB_STRDUP( service )) ) { - free_service_handle_info( info ); - WERR_NOMEM; - } - /* lookup the SERVICE_CONTROL_OPS */ for ( i=0; svcctl_ops[i].name; i++ ) { - if ( strequal( svcctl_ops[i].name, service ) ) + if ( strequal( svcctl_ops[i].name, service ) ) { info->ops = svcctl_ops[i].ops; + break; + } } + + if ( !svcctl_ops[i].name ) { + result = WERR_NO_SUCH_SERVICE; + goto done; + } + + if ( !(info->name = SMB_STRDUP( service )) ) { + result = WERR_NOMEM; + goto done; + } } info->access_granted = access_granted; @@ -204,11 +212,15 @@ /* store the SERVICE_INFO and create an open handle */ if ( !create_policy_hnd( p, handle, free_service_handle_info, info ) ) { - free_service_handle_info( info ); - return WERR_ACCESS_DENIED; + result = WERR_ACCESS_DENIED; + goto done; } - return WERR_OK; +done: + if ( !W_ERROR_IS_OK(result) ) + free_service_handle_info( info ); + + return result; } /
svn commit: samba r7612 - in trunk/source/utils: .
Author: lmuelle Date: 2005-06-15 15:55:06 + (Wed, 15 Jun 2005) New Revision: 7612 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7612 Log: Align trunk with the changes made to 3_0 with rev 7512 and 7609. Next time I'll ensure to keep both in sync at the sametime. Lars Modified: trunk/source/utils/net.h trunk/source/utils/net_rpc.c trunk/source/utils/net_rpc_printer.c Changeset: Sorry, the patch is too large (389 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7612
svn commit: samba r7611 - in trunk/source: . include param rpc_server services
Author: jerry Date: 2005-06-15 15:45:07 + (Wed, 15 Jun 2005) New Revision: 7611 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7611 Log: Bring trunk's svcctl code in line with SAMBA_3_0: svn merge -r7591:7595 $SVNURL/branches/SAMBA_3_0 svn merge -r7595:7603 $SVNURL/branches/SAMBA_3_0 svn merge -r7609:7610 $SVNURL/branches/SAMBA_3_0 Added: trunk/source/services/ Modified: trunk/source/Makefile.in trunk/source/include/rpc_secdes.h trunk/source/include/rpc_svcctl.h trunk/source/param/loadparm.c trunk/source/rpc_server/srv_svcctl_nt.c trunk/source/services/svc_rcinit.c trunk/source/services/svc_spoolss.c Changeset: Sorry, the patch is too large (1017 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7611
svn commit: samba r7610 - in branches/SAMBA_3_0/source: include param rpc_server services
Author: jerry Date: 2005-06-15 15:18:18 + (Wed, 15 Jun 2005) New Revision: 7610 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7610 Log: can successfully stop and start the 'spooler' service by setting the state for the 'disable spoolss' parameter in memory for an individual smbd Modified: branches/SAMBA_3_0/source/include/rpc_svcctl.h branches/SAMBA_3_0/source/param/loadparm.c branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c branches/SAMBA_3_0/source/services/svc_spoolss.c Changeset: Modified: branches/SAMBA_3_0/source/include/rpc_svcctl.h === --- branches/SAMBA_3_0/source/include/rpc_svcctl.h 2005-06-15 14:24:11 UTC (rev 7609) +++ branches/SAMBA_3_0/source/include/rpc_svcctl.h 2005-06-15 15:18:18 UTC (rev 7610) @@ -55,6 +55,7 @@ /* SERVER_STATUS - CurrentState */ +#define SVCCTL_STATE_UNKNOWN 0x /* only used internally to smbd */ #define SVCCTL_STOPPED 0x0001 #define SVCCTL_START_PENDING 0x0002 #define SVCCTL_STOP_PENDING0x0003 Modified: branches/SAMBA_3_0/source/param/loadparm.c === --- branches/SAMBA_3_0/source/param/loadparm.c 2005-06-15 14:24:11 UTC (rev 7609) +++ branches/SAMBA_3_0/source/param/loadparm.c 2005-06-15 15:18:18 UTC (rev 7610) @@ -1860,7 +1860,7 @@ FN_GLOBAL_INTEGER(lp_maxdisksize, &Globals.maxdisksize) FN_GLOBAL_INTEGER(lp_lpqcachetime, &Globals.lpqcachetime) FN_GLOBAL_INTEGER(lp_max_smbd_processes, &Globals.iMaxSmbdProcesses) -FN_GLOBAL_INTEGER(lp_disable_spoolss, &Globals.bDisableSpoolss) +FN_GLOBAL_INTEGER(_lp_disable_spoolss, &Globals.bDisableSpoolss) FN_GLOBAL_INTEGER(lp_syslog, &Globals.syslog) static FN_GLOBAL_INTEGER(lp_announce_as, &Globals.announce_as) FN_GLOBAL_INTEGER(lp_lm_announce, &Globals.lm_announce) @@ -4466,6 +4466,32 @@ Ensure we don't use sendfile if server smb signing is active. / +static uint32 spoolss_state; + +BOOL lp_disable_spoolss( void ) +{ + if ( spoolss_state == SVCCTL_STATE_UNKNOWN ) + spoolss_state = _lp_disable_spoolss() ? SVCCTL_STOPPED : SVCCTL_RUNNING; + + return spoolss_state == SVCCTL_STOPPED ? True : False; +} + +void lp_set_spoolss_state( uint32 state ) +{ + SMB_ASSERT( (state == SVCCTL_STOPPED) || (state == SVCCTL_RUNNING) ); + + spoolss_state = state; +} + +uint32 lp_get_spoolss_state( void ) +{ + return lp_disable_spoolss() ? SVCCTL_STOPPED : SVCCTL_RUNNING; +} + +/*** + Ensure we don't use sendfile if server smb signing is active. +/ + BOOL lp_use_sendfile(int snum) { /* Using sendfile blows the brains out of any DOS or Win9x TCP stack... JRA. */ Modified: branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2005-06-15 14:24:11 UTC (rev 7609) +++ branches/SAMBA_3_0/source/rpc_server/srv_svcctl_nt.c2005-06-15 15:18:18 UTC (rev 7610) @@ -318,6 +318,13 @@ if ( !(info->access_granted & SC_RIGHT_SVC_QUERY_STATUS) ) return WERR_ACCESS_DENIED; + /* try the service specific status call */ + + if ( info->ops ) + return info->ops->service_status( &r_u->svc_status ); + + /* default action for now */ + r_u->svc_status.type = 0x0020; r_u->svc_status.state = 0x0004; r_u->svc_status.controls_accepted = 0x0005; @@ -497,8 +504,6 @@ return WERR_ACCESS_DENIED; return info->ops->start_service(); - - return WERR_OK; } / @@ -521,71 +526,6 @@ return WERR_ACCESS_DENIED; return info->ops->stop_service( &r_u->svc_status ); - -#if 0 - SERVICE_INFO *service_info; - POLICY_HND *handle; - pstring command; - SERVICE_STATUS *service_status; - int ret,fd; - - /* need to find the service name by the handle that is open */ - handle = &(q_u->handle); - - service_info = find_service_info_by_hnd(p, handle); - - if (!service_info) { - DEBUG(10, ("_svcctl_control_service : Can't find the service for the handle\n")); - return WERR_BADFID; - } - - /* we return a SERVICE_STATUS structure if there's an error. */ - if ( !(service_status = TALLOC_ARRAY(p->mem_ctx, SERVICE_STATUS, 1 )) ) - return WERR_NOMEM; - - DEBUG(10, ("_svcctl_control_service: Found service [%s], [%s]\n", - servic
svn commit: samba r7609 - in branches/SAMBA_3_0/source/utils: .
Author: lmuelle Date: 2005-06-15 14:24:11 + (Wed, 15 Jun 2005) New Revision: 7609 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7609 Log: Move top level dir handling in from of the loop. This makes the code much straither. copy_top_level_perms() is jra's work. I modified the copy_top_level_perms() function to use the copy_clistate. And I don't forget trunk. Lars Modified: branches/SAMBA_3_0/source/utils/net.h branches/SAMBA_3_0/source/utils/net_rpc.c branches/SAMBA_3_0/source/utils/net_rpc_printer.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net.h === --- branches/SAMBA_3_0/source/utils/net.h 2005-06-15 13:01:39 UTC (rev 7608) +++ branches/SAMBA_3_0/source/utils/net.h 2005-06-15 14:24:11 UTC (rev 7609) @@ -31,7 +31,6 @@ struct cli_state *cli_share_src; struct cli_state *cli_share_dst; char *cwd; - BOOL top_level_dir; uint16 attribute; int mode; }copy_clistate; Modified: branches/SAMBA_3_0/source/utils/net_rpc.c === --- branches/SAMBA_3_0/source/utils/net_rpc.c 2005-06-15 13:01:39 UTC (rev 7608) +++ branches/SAMBA_3_0/source/utils/net_rpc.c 2005-06-15 14:24:11 UTC (rev 7609) @@ -2798,13 +2798,7 @@ local_state = (struct copy_clistate *)state; nt_status = NT_STATUS_UNSUCCESSFUL; - if (strequal(f->name, ".")) { - if (local_state->top_level_dir) - f->name[0] = '\0'; - else - return; - } - if (strequal(f->name, "..")) + if (strequal(f->name, ".") || strequal(f->name, "..")) return; DEBUG(3,("got mask: %s, name: %s\n", mask, f->name)); @@ -2832,7 +2826,7 @@ False); break; default: - DEBUG(0,( "Unsupported mode %d", local_state->mode)); + d_printf("Unsupported mode %d\n", local_state->mode); return; } @@ -2840,19 +2834,16 @@ printf("could not handle dir %s: %s\n", dir, nt_errstr(nt_status)); - if (!local_state->top_level_dir) { - /* search below that directory */ - fstrcpy(new_mask, dir); - fstrcat(new_mask, "\\*"); + /* search below that directory */ + fstrcpy(new_mask, dir); + fstrcat(new_mask, "\\*"); - old_dir = local_state->cwd; -local_state->cwd = dir; - if (!sync_files(local_state, new_mask)) - printf("could not handle files\n"); - local_state->cwd = old_dir; - } else - local_state->top_level_dir = False; - + old_dir = local_state->cwd; + local_state->cwd = dir; + if (!sync_files(local_state, new_mask)) + printf("could not handle files\n"); + local_state->cwd = old_dir; + return; } @@ -2877,7 +2868,7 @@ True); break; default: - DEBUG(0,( "Unsupported file mode %d", local_state->mode)); + d_printf("Unsupported file mode %d\n", local_state->mode); return; } @@ -2911,6 +2902,43 @@ } +/** + * Set the top level directory permissions before we do any further copies. + * Should set up ACL inheritance. + **/ + +BOOL copy_top_level_perms(struct copy_clistate *cp_clistate, + const char *sharename) +{ + NTSTATUS nt_status; + + switch (cp_clistate->mode) { + case NET_MODE_SHARE_MIGRATE: + DEBUG(3,("calling net_copy_fileattr for '.' directory in share %s\n", sharename)); + nt_status = net_copy_fileattr(cp_clistate->mem_ctx, + cp_clistate->cli_share_src, + cp_clistate->cli_share_dst, + "\\", "\\", + opt_acls? True : False, + opt_attrs? True : False, + opt_timestamps? True: False, + False); + break; + default: + d_printf("Unsupported mode %d\n", cp_clistate->mode); + break; + } + + if (!NT_STATUS_IS_OK(nt_status)) { + printf("Could handle directory attributes for top level directory of share %s. Error %s\n",
svn commit: samba r7608 - in branches/SAMBA_4_0/source/lib/ldb/common: .
Author: idra Date: 2005-06-15 13:01:39 + (Wed, 15 Jun 2005) New Revision: 7608 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7608 Log: bug fix after yesterday's change Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2005-06-15 13:01:19 UTC (rev 7607) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c 2005-06-15 13:01:39 UTC (rev 7608) @@ -140,7 +140,7 @@ const char * const attrs[] = { "@LIST" , NULL}; struct ldb_message **msg = NULL; - ret = ldb_search(ldb, "", LDB_SCOPE_BASE, "[EMAIL PROTECTED]", attrs, &msg); + ret = ldb_search(ldb, "@MODULES", LDB_SCOPE_BASE, "", attrs, &msg); if (ret == 0 || (ret == 1 && msg[0]->num_elements == 0)) { ldb_debug(ldb, LDB_DEBUG_TRACE, "no modules required by the db\n"); } else {
svn commit: samba r7607 - branches/SAMBA_3_0/source/utils trunk/source/utils
Author: gd Date: 2005-06-15 13:01:19 + (Wed, 15 Jun 2005) New Revision: 7607 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7607 Log: Some minor fixes (typos, const) Guenther Modified: branches/SAMBA_3_0/source/utils/net_rpc_printer.c trunk/source/utils/net_rpc_printer.c Changeset: Modified: branches/SAMBA_3_0/source/utils/net_rpc_printer.c === --- branches/SAMBA_3_0/source/utils/net_rpc_printer.c 2005-06-15 12:43:36 UTC (rev 7606) +++ branches/SAMBA_3_0/source/utils/net_rpc_printer.c 2005-06-15 13:01:19 UTC (rev 7607) @@ -296,7 +296,7 @@ net_copy_fileattr(TALLOC_CTX *mem_ctx, struct cli_state *cli_share_src, struct cli_state *cli_share_dst, - char *src_name, char *dst_name, + const char *src_name, const char *dst_name, BOOL copy_acls, BOOL copy_attrs, BOOL copy_timestamps, BOOL is_file) { @@ -449,7 +449,7 @@ NTSTATUS net_copy_file(TALLOC_CTX *mem_ctx, struct cli_state *cli_share_src, struct cli_state *cli_share_dst, - char *src_name, char *dst_name, + const char *src_name, const char *dst_name, BOOL copy_acls, BOOL copy_attrs, BOOL copy_timestamps, BOOL is_file) { @@ -1138,7 +1138,6 @@ uint32 *num_printers, PRINTER_INFO_CTR *ctr) { - char *sharename; POLICY_HND hnd; /* no arguments given, enumerate all printers */ @@ -1154,9 +1153,7 @@ /* argument given, get a single printer by name */ - sharename = SMB_STRDUP(argv[0]); - - if (!net_spoolss_open_printer_ex(cli, mem_ctx, sharename, + if (!net_spoolss_open_printer_ex(cli, mem_ctx, argv[0], MAXIMUM_ALLOWED_ACCESS, cli->user_name, &hnd)) return False; @@ -1255,7 +1252,7 @@ for (i=0; archi_table[i].long_archi!=NULL; i++) { - int num_drivers; + uint32 num_drivers; /* enum remote drivers */ if (!net_spoolss_enumprinterdrivers(cli, mem_ctx, level, @@ -1396,7 +1393,7 @@ } /** - * List print-queues w.r.t. thei publishing + * List print-queues w.r.t. their publishing state * * All parameters are provided by the run_rpc_command function, except for * argc, argv which are passed through. Modified: trunk/source/utils/net_rpc_printer.c === --- trunk/source/utils/net_rpc_printer.c2005-06-15 12:43:36 UTC (rev 7606) +++ trunk/source/utils/net_rpc_printer.c2005-06-15 13:01:19 UTC (rev 7607) @@ -296,7 +296,7 @@ net_copy_fileattr(TALLOC_CTX *mem_ctx, struct cli_state *cli_share_src, struct cli_state *cli_share_dst, - char *src_name, char *dst_name, + const char *src_name, const char *dst_name, BOOL copy_acls, BOOL copy_attrs, BOOL copy_timestamps, BOOL is_file) { @@ -449,7 +449,7 @@ NTSTATUS net_copy_file(TALLOC_CTX *mem_ctx, struct cli_state *cli_share_src, struct cli_state *cli_share_dst, - char *src_name, char *dst_name, + const char *src_name, const char *dst_name, BOOL copy_acls, BOOL copy_attrs, BOOL copy_timestamps, BOOL is_file) { @@ -1137,7 +1137,6 @@ uint32 *num_printers, PRINTER_INFO_CTR *ctr) { - char *sharename; POLICY_HND hnd; /* no arguments given, enumerate all printers */ @@ -1153,9 +1152,7 @@ /* argument given, get a single printer by name */ - sharename = SMB_STRDUP(argv[0]); - - if (!net_spoolss_open_printer_ex(cli, mem_ctx, sharename, + if (!net_spoolss_open_printer_ex(cli, mem_ctx, argv[0], MAXIMUM_ALLOWED_ACCESS, cli->user_name, &hnd)) return False; @@ -1254,7 +1251,7 @@ for (i=0; archi_table[i].long_archi!=NULL; i++) { - int num_drivers; + uint32 num_drivers; /* enum remote drivers */ if (!net_spoolss_enumprinterdrivers(cli, mem_ctx, level, @@ -1395,7 +1392,7 @@ } /** - * List print-queues w.r.t. thei publishing + * List print-queues w.r.t. their publishing state * * All parameters are provided by the run_rpc_command function, except for * argc, argv which are passed through.
svn commit: samba r7606 - branches/SAMBA_3_0/source/include branches/SAMBA_3_0/source/libsmb branches/SAMBA_3_0/source/rpc_server trunk/source/include trunk/source/libsmb trunk/source/rpc_server
Author: gd Date: 2005-06-15 12:43:36 + (Wed, 15 Jun 2005) New Revision: 7606 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7606 Log: add WERR_NET_NAME_NOT_FOUND. This is what windows returns when trying to manipulate non-existing shares. Guenther Modified: branches/SAMBA_3_0/source/include/doserr.h branches/SAMBA_3_0/source/libsmb/doserr.c branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c trunk/source/include/doserr.h trunk/source/libsmb/doserr.c trunk/source/rpc_server/srv_srvsvc_nt.c Changeset: Modified: branches/SAMBA_3_0/source/include/doserr.h === --- branches/SAMBA_3_0/source/include/doserr.h 2005-06-15 10:44:56 UTC (rev 7605) +++ branches/SAMBA_3_0/source/include/doserr.h 2005-06-15 12:43:36 UTC (rev 7606) @@ -236,4 +236,7 @@ #define WERR_DFS_INTERNAL_ERROR W_ERROR(NERR_BASE+590) #define WERR_DFS_CANT_CREATE_JUNCT W_ERROR(NERR_BASE+569) +#define WERR_NET_NAME_NOT_FOUNDW_ERROR(NERR_BASE+210) + + #endif /* _DOSERR_H */ Modified: branches/SAMBA_3_0/source/libsmb/doserr.c === --- branches/SAMBA_3_0/source/libsmb/doserr.c 2005-06-15 10:44:56 UTC (rev 7605) +++ branches/SAMBA_3_0/source/libsmb/doserr.c 2005-06-15 12:43:36 UTC (rev 7606) @@ -71,6 +71,7 @@ { "WERR_SERVER_UNAVAILABLE", WERR_SERVER_UNAVAILABLE }, { "WERR_IO_PENDING", WERR_IO_PENDING }, { "WERR_INVALID_SERVICE_CONTROL", WERR_INVALID_SERVICE_CONTROL }, + { "WERR_NET_NAME_NOT_FOUND", WERR_NET_NAME_NOT_FOUND }, { NULL, W_ERROR(0) } }; Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2005-06-15 10:44:56 UTC (rev 7605) +++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2005-06-15 12:43:36 UTC (rev 7606) @@ -1536,7 +1536,7 @@ /* Does this share exist ? */ if (snum < 0) - return WERR_INVALID_NAME; + return WERR_NET_NAME_NOT_FOUND; /* No change to printer shares. */ if (lp_print_ok(snum)) Modified: trunk/source/include/doserr.h === --- trunk/source/include/doserr.h 2005-06-15 10:44:56 UTC (rev 7605) +++ trunk/source/include/doserr.h 2005-06-15 12:43:36 UTC (rev 7606) @@ -236,4 +236,7 @@ #define WERR_DFS_INTERNAL_ERROR W_ERROR(NERR_BASE+590) #define WERR_DFS_CANT_CREATE_JUNCT W_ERROR(NERR_BASE+569) +#define WERR_NET_NAME_NOT_FOUNDW_ERROR(NERR_BASE+210) + + #endif /* _DOSERR_H */ Modified: trunk/source/libsmb/doserr.c === --- trunk/source/libsmb/doserr.c2005-06-15 10:44:56 UTC (rev 7605) +++ trunk/source/libsmb/doserr.c2005-06-15 12:43:36 UTC (rev 7606) @@ -71,6 +71,7 @@ { "WERR_SERVER_UNAVAILABLE", WERR_SERVER_UNAVAILABLE }, { "WERR_IO_PENDING", WERR_IO_PENDING }, { "WERR_INVALID_SERVICE_CONTROL", WERR_INVALID_SERVICE_CONTROL }, + { "WERR_NET_NAME_NOT_FOUND", WERR_NET_NAME_NOT_FOUND }, { NULL, W_ERROR(0) } }; Modified: trunk/source/rpc_server/srv_srvsvc_nt.c === --- trunk/source/rpc_server/srv_srvsvc_nt.c 2005-06-15 10:44:56 UTC (rev 7605) +++ trunk/source/rpc_server/srv_srvsvc_nt.c 2005-06-15 12:43:36 UTC (rev 7606) @@ -1536,7 +1536,7 @@ /* Does this share exist ? */ if (snum < 0) - return WERR_INVALID_NAME; + return WERR_NET_NAME_NOT_FOUND; /* No change to printer shares. */ if (lp_print_ok(snum))
svn commit: samba-web r699 - in trunk/team: .
Author: lmuelle Date: 2005-06-15 11:21:32 + (Wed, 15 Jun 2005) New Revision: 699 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=699 Log: Add myself. Lars Modified: trunk/team/index.html Changeset: Modified: trunk/team/index.html === --- trunk/team/index.html 2005-06-15 05:36:40 UTC (rev 698) +++ trunk/team/index.html 2005-06-15 11:21:32 UTC (rev 699) @@ -66,6 +66,7 @@ http://www.devurandom.org";>Deryck Hodge mailto:[EMAIL PROTECTED]">Vance Lankhaar mailto:[EMAIL PROTECTED]">Guenther Deschner +mailto:[EMAIL PROTECTED]">Lars Müller
svn commit: samba r7605 - in branches/SAMBA_4_0/source/build/pidl: .
Author: jelmer Date: 2005-06-15 10:44:56 + (Wed, 15 Jun 2005) New Revision: 7605 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7605 Log: Display properties in header files again. Modified: branches/SAMBA_4_0/source/build/pidl/ndr_header.pm Changeset: Modified: branches/SAMBA_4_0/source/build/pidl/ndr_header.pm === --- branches/SAMBA_4_0/source/build/pidl/ndr_header.pm 2005-06-15 10:11:33 UTC (rev 7604) +++ branches/SAMBA_4_0/source/build/pidl/ndr_header.pm 2005-06-15 10:44:56 UTC (rev 7605) @@ -31,12 +31,10 @@ my($props,$ignores) = @_; my $ret = ""; - return; - foreach my $d (keys %{$props}) { - next if ($ignores->{$d}); + next if (grep(/^$d$/, @$ignores)); if($props->{$d} ne "1") { - $ret.= "$d(" . $props->{$d} . "),"; + $ret.= "$d($props->{$d}),"; } else { $ret.="$d,"; } @@ -53,9 +51,6 @@ { my($element) = shift; - if (defined $element->{PROPERTIES}) { - HeaderProperties($element->{PROPERTIES}, {"in" => 1, "out" => 1}); - } pidl tabs(); HeaderType($element, $element->{TYPE}, ""); pidl " "; @@ -68,7 +63,7 @@ $nl = Ndr::GetNextLevel($element, $nl) if ($nl->{TYPE} eq "SUBCONTEXT"); next if ($nl->{TYPE} eq "DATA" and typelist::scalar_is_reference($nl->{DATA_TYPE})); $prefix .= "*"; - } elsif (($l->{TYPE} eq "ARRAY")) { + } elsif ($l->{TYPE} eq "ARRAY") { my $pl = Ndr::GetPrevLevel($element, $l); next if ($pl and $pl->{TYPE} eq "POINTER"); @@ -85,7 +80,11 @@ if (defined $element->{ARRAY_LEN}[0] && util::is_constant($element->{ARRAY_LEN}[0])) { pidl "[$element->{ARRAY_LEN}[0]]"; } - pidl ";\n"; + pidl ";"; + if (defined $element->{PROPERTIES}) { + HeaderProperties($element->{PROPERTIES}, ["in", "out"]); + } + pidl "\n"; } # @@ -108,6 +107,9 @@ } $tab_depth--; pidl "}"; + if (defined $struct->{PROPERTIES}) { + HeaderProperties($struct->{PROPERTIES}, []); + } } # @@ -180,9 +182,6 @@ my($union,$name) = @_; my %done = (); - if (defined $union->{PROPERTIES}) { - HeaderProperties($union->{PROPERTIES}, {}); - } pidl "\nunion $name {\n"; $tab_depth++; foreach my $e (@{$union->{ELEMENTS}}) { @@ -195,6 +194,10 @@ } $tab_depth--; pidl "}"; + + if (defined $union->{PROPERTIES}) { + HeaderProperties($union->{PROPERTIES}, []); + } } # @@ -456,9 +459,7 @@ $res = ""; pidl "/* header auto-generated by pidl */\n\n"; foreach my $x (@{$idl}) { - if ($x->{TYPE} eq "INTERFACE") { - HeaderInterface($x); - } + ($x->{TYPE} eq "INTERFACE") && HeaderInterface($x); } return $res; }
svn commit: samba r7604 - in branches/SAMBA_4_0/source/build/pidl: .
Author: jelmer Date: 2005-06-15 10:11:33 + (Wed, 15 Jun 2005) New Revision: 7604 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7604 Log: Bunch of small pidl updates. Mostly removing unused functions, cleanups and more flexibility (all output options now take an optional filename). Added: branches/SAMBA_4_0/source/build/pidl/ejs.pm Removed: branches/SAMBA_4_0/source/build/pidl/esp.pm Modified: branches/SAMBA_4_0/source/build/pidl/README branches/SAMBA_4_0/source/build/pidl/ndr.pm branches/SAMBA_4_0/source/build/pidl/ndr_client.pm branches/SAMBA_4_0/source/build/pidl/ndr_header.pm branches/SAMBA_4_0/source/build/pidl/ndr_parser.pm branches/SAMBA_4_0/source/build/pidl/pidl.pl Changeset: Sorry, the patch is too large (1291 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7604