svn commit: samba-docs r783 - in trunk/smbdotconf/logon: .
Author: jht Date: 2005-07-17 05:46:16 + (Sun, 17 Jul 2005) New Revision: 783 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=783 Log: More documentation regarding disabling of roamin profile paraphenalia. Modified: trunk/smbdotconf/logon/logondrive.xml trunk/smbdotconf/logon/logonhome.xml trunk/smbdotconf/logon/logonpath.xml Changeset: Modified: trunk/smbdotconf/logon/logondrive.xml === --- trunk/smbdotconf/logon/logondrive.xml 2005-07-13 19:20:22 UTC (rev 782) +++ trunk/smbdotconf/logon/logondrive.xml 2005-07-17 05:46:16 UTC (rev 783) @@ -4,12 +4,15 @@ advanced="1" developer="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";> - This parameter specifies the local path to - which the home directory will be connected (see ) - and is only used by NT Workstations. + + This parameter specifies the local path to which the home directory will be + connected (see ) and is only used by NT + Workstations. + - Note that this option is only useful if Samba is set up as a - logon server. + + Note that this option is only useful if Samba is set up as a logon server. + z: h: Modified: trunk/smbdotconf/logon/logonhome.xml === --- trunk/smbdotconf/logon/logonhome.xml2005-07-13 19:20:22 UTC (rev 782) +++ trunk/smbdotconf/logon/logonhome.xml2005-07-17 05:46:16 UTC (rev 783) @@ -4,39 +4,52 @@ advanced="1" developer="1" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";> - This parameter specifies the home directory - location when a Win95/98 or NT Workstation logs into a Samba PDC. - It allows you to do + + This parameter specifies the home directory location when a Win95/98 or NT Workstation logs into a Samba PDC. + It allows you to do + - C:\> - NET USE H: /HOME + + C:\>NET USE H: /HOME - from a command prompt, for example. + + from a command prompt, for example. + - This option takes the standard substitutions, allowing - you to have separate logon scripts for each user or machine. + + This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine. + - This parameter can be used with Win9X workstations to ensure - that roaming profiles are stored in a subdirectory of the user's - home directory. This is done in the following way: + + This parameter can be used with Win9X workstations to ensure that roaming profiles are stored in a + subdirectory of the user's home directory. This is done in the following way: + - logon home = \\%N\%U\profile + + logon home = \\%N\%U\profile + - This tells Samba to return the above string, with - substitutions made when a client requests the info, generally - in a NetUserGetInfo request. Win9X clients truncate the info to - \\server\share when a user does net use /home - but use the whole string when dealing with profiles. + + This tells Samba to return the above string, with substitutions made when a client requests the info, generally + in a NetUserGetInfo request. Win9X clients truncate the info to \\server\share when a user does + net use /home but use the whole string when dealing with profiles. + - Note that in prior versions of Samba, the was returned rather than - logon home. This broke net use /home but allowed profiles outside the home directory. - The current implementation is correct, and can be used for profiles if you use - the above trick. + + Note that in prior versions of Samba, the was returned rather than + logon home. This broke net use /home + but allowed profiles outside the home directory. The current implementation is correct, and can be used for + profiles if you use the above trick. + - This option is only useful if Samba is set up as a logon - server. + + Disable this feature by setting "" - using the empty string. + + + + This option is only useful if Samba is set up as a logon server. + \\%N\%U Modified: trunk/smbdotconf/logon/logonpath.xml === --- trunk/smbdotconf/logon/logonpath.xml2005-07-13 19:20:22 UTC (rev 782) +++ trunk/smbdotconf/logon/logonpath.xml2005-07-17 05:46:16 UTC (rev 783) @@ -4,40 +4,42 @@ advanced="1" developer="1" xmlns:s
Build status as of Sun Jul 17 00:00:01 2005
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2005-07-16 00:00:32.0 + +++ /home/build/master/cache/broken_results.txt 2005-07-17 00:00:07.0 + @@ -1,4 +1,4 @@ -Build status as of Sat Jul 16 00:00:02 2005 +Build status as of Sun Jul 17 00:00:01 2005 Build counts: Tree Total Broken Panic @@ -12,5 +12,5 @@ samba_3_037 8 0 smb-build33 6 0 talloc 35 14 0 -tdb 36 18 0 +tdb 36 17 0
svn commit: samba r8516 - in branches/SAMBA_4_0/source/scripting/ejs: .
Author: idra Date: 2005-07-16 18:17:08 + (Sat, 16 Jul 2005) New Revision: 8516 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8516 Log: let us use all parameters of ldbsearch in ldb.search Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c Changeset: Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c === --- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c 2005-07-16 18:16:32 UTC (rev 8515) +++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c 2005-07-16 18:17:08 UTC (rev 8516) @@ -44,22 +44,26 @@ res = ldb.search("expression"); var attrs = new Array("attr1", "attr2", "attr3"); ldb.search("expression", attrs); + var basedn = "cn=this,dc=is,dc=a,dc=test"; + ldb.search("expression", attrs, ldb.SCOPE_SUBTREE, basedn); */ static int ejs_ldbSearch(MprVarHandle eid, int argc, struct MprVar **argv) { const char **attrs = NULL; const char *expression; + const char *basedn = NULL; + int scope = LDB_SCOPE_DEFAULT; TALLOC_CTX *tmp_ctx = talloc_new(mprMemCtx()); struct ldb_context *ldb; int ret; struct ldb_message **res; /* validate arguments */ - if (argc < 1 || argc > 2) { - ejsSetErrorMsg(eid, "ldb.search invalid arguments"); + if (argc < 1 || argc > 4) { + ejsSetErrorMsg(eid, "ldb.search invalid number of arguments"); goto failed; } - if (argc == 2 && argv[1]->type != MPR_TYPE_OBJECT) { + if (argc > 3 && argv[3]->type != MPR_TYPE_OBJECT) { ejsSetErrorMsg(eid, "ldb.search attributes must be an object"); goto failed; } @@ -71,14 +75,30 @@ expression = mprToString(argv[0]); if (expression == NULL) { - ejsSetErrorMsg(eid, "ldb.search invalid arguments"); + ejsSetErrorMsg(eid, "ldb.search invalid expression"); goto failed; } - if (argc == 2) { - attrs = mprToList(tmp_ctx, argv[1]); + if (argc > 1) { + basedn = mprToString(argv[1]); + /* a null basedn is valid */ } - - ret = ldb_search(ldb, NULL, LDB_SCOPE_DEFAULT, expression, attrs, &res); + if (argc > 2) { + scope = mprToInt(argv[2]); + switch (scope) { + case LDB_SCOPE_DEFAULT: + case LDB_SCOPE_BASE: + case LDB_SCOPE_ONELEVEL: + case LDB_SCOPE_SUBTREE: + break; /* ok */ + default: + ejsSetErrorMsg(eid, "ldb.search invalid scope"); + goto failed; + } + } + if (argc > 3) { + attrs = mprToList(tmp_ctx, argv[3]); + } + ret = ldb_search(ldb, basedn, scope, expression, attrs, &res); if (ret == -1) { ejsSetErrorMsg(eid, "ldb.search failed - %s", ldb_errstring(ldb)); mpr_Return(eid, mprCreateUndefinedVar()); @@ -261,6 +281,9 @@ mprSetCFunction(ldb, "modify", ejs_ldbModify); mprSetCFunction(ldb, "delete", ejs_ldbDelete); mprSetCFunction(ldb, "rename", ejs_ldbRename); + mprSetVar(ldb, "SCOPE_BASE", mprCreateNumberVar(LDB_SCOPE_BASE)); + mprSetVar(ldb, "SCOPE_ONE", mprCreateNumberVar(LDB_SCOPE_ONELEVEL)); + mprSetVar(ldb, "SCOPE_SUBTREE", mprCreateNumberVar(LDB_SCOPE_SUBTREE)); return 0; }
svn commit: samba r8515 - in branches/SAMBA_4_0/source/lib/ldb: common include tools
Author: idra Date: 2005-07-16 18:16:32 + (Sat, 16 Jul 2005) New Revision: 8515 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8515 Log: ldb_dn_cmp now uses ldb_dn_compare so that the DNs are compared on a content level not ona form level, his means that the 2 DNs: a) cn= user, dc=this, dc = is,dc=test b) cn=user,dc=this,dc=is,dc=test are now identical even if the string form differ (spaces) Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c branches/SAMBA_4_0/source/lib/ldb/include/ldb.h branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2005-07-16 16:12:14 UTC (rev 8514) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2005-07-16 18:16:32 UTC (rev 8515) @@ -450,6 +450,29 @@ return ldb_dn_compare_base(ldb, edn0, edn1); } +int ldb_dn_cmp(struct ldb_context *ldb, const char *dn0, const char *dn1) +{ + struct ldb_dn *edn0; + struct ldb_dn *edn1; + int ret; + + edn0 = ldb_dn_explode_casefold(ldb, dn0); + if (edn0 == NULL) return 0; + + edn1 = ldb_dn_explode_casefold(ldb, dn1); + if (edn1 == NULL) { + talloc_free(edn0); + return 0; + } + + ret = ldb_dn_compare(ldb, edn0, edn1); + + talloc_free(edn0); + talloc_free(edn1); + + return ret; +} + /* casefold a dn. We need to casefold the attribute names, and canonicalize attribute values of case insensitive attributes. Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c 2005-07-16 16:12:14 UTC (rev 8514) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_utf8.c 2005-07-16 18:16:32 UTC (rev 8515) @@ -73,15 +73,6 @@ } /* - compare two basedn fields - return 0 for match -*/ -int ldb_dn_cmp(const char *dn1, const char *dn2) -{ - return ldb_caseless_cmp(dn1, dn2); -} - -/* compare two attributes return 0 for match */ Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb.h === --- branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2005-07-16 16:12:14 UTC (rev 8514) +++ branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2005-07-16 18:16:32 UTC (rev 8515) @@ -335,7 +335,7 @@ /* useful functions for ldb_message structure manipulation */ -int ldb_dn_cmp(const char *dn1, const char *dn2); +int ldb_dn_cmp(struct ldb_context *ldb, const char *dn1, const char *dn2); int ldb_attr_cmp(const char *dn1, const char *dn2); /* case-fold a DN */ Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c === --- branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c 2005-07-16 16:12:14 UTC (rev 8514) +++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c 2005-07-16 18:16:32 UTC (rev 8515) @@ -93,12 +93,14 @@ /* find dn in msgs[] */ -static struct ldb_message *msg_find(struct ldb_message **msgs, int count, +static struct ldb_message *msg_find(struct ldb_context *ldb, + struct ldb_message **msgs, + int count, const char *dn) { int i; for (i=0;idn) == 0) { + if (ldb_dn_cmp(ldb, dn, msgs[i]->dn) == 0) { return msgs[i]; } } @@ -119,7 +121,7 @@ /* do the adds and modifies */ for (i=0;idn); + msg = msg_find(ldb, msgs1, count1, msgs2[i]->dn); if (!msg) { if (options->verbose > 0) { ldif_write_msg(ldb, stdout, LDB_CHANGETYPE_ADD, msgs2[i]); @@ -139,7 +141,7 @@ /* do the deletes */ for (i=0;idn); + msg = msg_find(ldb, msgs2, count2, msgs1[i]->dn); if (!msg) { if (options->verbose > 0) { ldif_write_msg(ldb, stdout, LDB_CHANGETYPE_DELETE, msgs1[i]); Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c === --- branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c 2005-07-16 16:12:14 UTC (rev 8514) +++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c 2005-07-16 18:16:32 UTC (rev 8515) @@ -55,10 +55,12 @@ exit(1); } +struct ldb_context *ldbsearch_ldb; + static int do_compare_msg(struct ldb_message **el1, - struct ldb_message **el2) + struct ldb_message **el2) { - return ldb_dn_cmp((*el1)->dn, (*el2)->dn); +
svn commit: samba r8514 - in branches/SAMBA_4_0/source/ldap_server/devdocs: .
Author: idra Date: 2005-07-16 16:12:14 + (Sat, 16 Jul 2005) New Revision: 8514 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8514 Log: add docs Added: branches/SAMBA_4_0/source/ldap_server/devdocs/rfc2251.txt Changeset: Sorry, the patch is too large (2808 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8514
svn commit: samba r8513 - in trunk/source: include smbd
Author: vlendec Date: 2005-07-16 09:56:05 + (Sat, 16 Jul 2005) New Revision: 8513 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8513 Log: Feed Jeremy's paranoia -- back out the last patch :-) Thanks, Volker Modified: trunk/source/include/smb.h trunk/source/smbd/oplock.c Changeset: Modified: trunk/source/include/smb.h === --- trunk/source/include/smb.h 2005-07-16 09:09:19 UTC (rev 8512) +++ trunk/source/include/smb.h 2005-07-16 09:56:05 UTC (rev 8513) @@ -1511,6 +1511,7 @@ /* Message types */ #define OPLOCK_BREAK_CMD 0x1 #define KERNEL_OPLOCK_BREAK_CMD 0x2 +#define LEVEL_II_OPLOCK_BREAK_CMD 0x3 #define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4 /* Add the "deferred open" message. */ Modified: trunk/source/smbd/oplock.c === --- trunk/source/smbd/oplock.c 2005-07-16 09:09:19 UTC (rev 8512) +++ trunk/source/smbd/oplock.c 2005-07-16 09:56:05 UTC (rev 8513) @@ -381,6 +381,7 @@ break; case OPLOCK_BREAK_CMD: + case LEVEL_II_OPLOCK_BREAK_CMD: case ASYNC_LEVEL_II_OPLOCK_BREAK_CMD: /* Ensure that the msg length is correct. */ @@ -482,7 +483,8 @@ * case. */ - if (break_cmd_type != OPLOCK_BREAK_CMD) { + if (!((break_cmd_type == OPLOCK_BREAK_CMD) || + (break_cmd_type == LEVEL_II_OPLOCK_BREAK_CMD))) { return True; } @@ -995,6 +997,7 @@ SMB_DEV_T dev = share_entry->dev; SMB_INO_T inode = share_entry->inode; unsigned long file_id = share_entry->share_file_id; + uint16 break_cmd_type; if(pid == share_entry->pid) { /* We are breaking our own oplock, make sure it's us. */ @@ -1024,7 +1027,13 @@ /* We need to send a OPLOCK_BREAK_CMD message to the port in the share mode entry. */ - SSVAL(op_break_msg,OPBRK_MESSAGE_CMD_OFFSET,OPLOCK_BREAK_CMD); + if (LEVEL_II_OPLOCK_TYPE(share_entry->op_type)) { + break_cmd_type = LEVEL_II_OPLOCK_BREAK_CMD; + } else { + break_cmd_type = OPLOCK_BREAK_CMD; + } + + SSVAL(op_break_msg,OPBRK_MESSAGE_CMD_OFFSET,break_cmd_type); memcpy(op_break_msg+OPLOCK_BREAK_PID_OFFSET,(char *)&pid,sizeof(pid)); memcpy(op_break_msg+OPLOCK_BREAK_DEV_OFFSET,(char *)&dev,sizeof(dev)); memcpy(op_break_msg+OPLOCK_BREAK_INODE_OFFSET,(char *)&inode,sizeof(inode)); @@ -1110,7 +1119,7 @@ * Test to see if this is the reply we are awaiting (ie. the one we sent with the CMD_REPLY flag OR'ed in). */ if((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & CMD_REPLY) && - ((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & ~CMD_REPLY) == OPLOCK_BREAK_CMD) && + ((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & ~CMD_REPLY) == break_cmd_type) && (reply_from_port == share_entry->op_port) && (memcmp(&reply_msg_start[OPLOCK_BREAK_PID_OFFSET], &op_break_msg[OPLOCK_BREAK_PID_OFFSET], OPLOCK_BREAK_MSG_LEN - OPLOCK_BREAK_PID_OFFSET) == 0)) {
svn commit: samba r8512 - in trunk/source: include smbd
Author: vlendec Date: 2005-07-16 09:09:19 + (Sat, 16 Jul 2005) New Revision: 8512 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8512 Log: Jeremy, I did not see a distinction between LEVEL_II_OPLOCK_BREAK_CMD and OPLOCK_BREAK_CMD anywhere in the code. This removes LEVEL_II_OPLOCK_BREAK_CMD. I'm sure you will take a close look at this... :-) Thanks, Volker Modified: trunk/source/include/smb.h trunk/source/smbd/oplock.c Changeset: Modified: trunk/source/include/smb.h === --- trunk/source/include/smb.h 2005-07-16 01:02:17 UTC (rev 8511) +++ trunk/source/include/smb.h 2005-07-16 09:09:19 UTC (rev 8512) @@ -1511,7 +1511,6 @@ /* Message types */ #define OPLOCK_BREAK_CMD 0x1 #define KERNEL_OPLOCK_BREAK_CMD 0x2 -#define LEVEL_II_OPLOCK_BREAK_CMD 0x3 #define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4 /* Add the "deferred open" message. */ Modified: trunk/source/smbd/oplock.c === --- trunk/source/smbd/oplock.c 2005-07-16 01:02:17 UTC (rev 8511) +++ trunk/source/smbd/oplock.c 2005-07-16 09:09:19 UTC (rev 8512) @@ -381,7 +381,6 @@ break; case OPLOCK_BREAK_CMD: - case LEVEL_II_OPLOCK_BREAK_CMD: case ASYNC_LEVEL_II_OPLOCK_BREAK_CMD: /* Ensure that the msg length is correct. */ @@ -483,8 +482,7 @@ * case. */ - if (!((break_cmd_type == OPLOCK_BREAK_CMD) || - (break_cmd_type == LEVEL_II_OPLOCK_BREAK_CMD))) { + if (break_cmd_type != OPLOCK_BREAK_CMD) { return True; } @@ -997,7 +995,6 @@ SMB_DEV_T dev = share_entry->dev; SMB_INO_T inode = share_entry->inode; unsigned long file_id = share_entry->share_file_id; - uint16 break_cmd_type; if(pid == share_entry->pid) { /* We are breaking our own oplock, make sure it's us. */ @@ -1027,13 +1024,7 @@ /* We need to send a OPLOCK_BREAK_CMD message to the port in the share mode entry. */ - if (LEVEL_II_OPLOCK_TYPE(share_entry->op_type)) { - break_cmd_type = LEVEL_II_OPLOCK_BREAK_CMD; - } else { - break_cmd_type = OPLOCK_BREAK_CMD; - } - - SSVAL(op_break_msg,OPBRK_MESSAGE_CMD_OFFSET,break_cmd_type); + SSVAL(op_break_msg,OPBRK_MESSAGE_CMD_OFFSET,OPLOCK_BREAK_CMD); memcpy(op_break_msg+OPLOCK_BREAK_PID_OFFSET,(char *)&pid,sizeof(pid)); memcpy(op_break_msg+OPLOCK_BREAK_DEV_OFFSET,(char *)&dev,sizeof(dev)); memcpy(op_break_msg+OPLOCK_BREAK_INODE_OFFSET,(char *)&inode,sizeof(inode)); @@ -1119,7 +1110,7 @@ * Test to see if this is the reply we are awaiting (ie. the one we sent with the CMD_REPLY flag OR'ed in). */ if((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & CMD_REPLY) && - ((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & ~CMD_REPLY) == break_cmd_type) && + ((SVAL(reply_msg_start,OPBRK_MESSAGE_CMD_OFFSET) & ~CMD_REPLY) == OPLOCK_BREAK_CMD) && (reply_from_port == share_entry->op_port) && (memcmp(&reply_msg_start[OPLOCK_BREAK_PID_OFFSET], &op_break_msg[OPLOCK_BREAK_PID_OFFSET], OPLOCK_BREAK_MSG_LEN - OPLOCK_BREAK_PID_OFFSET) == 0)) {