svn commit: samba-docs r907 - in trunk/manpages-3: .

2006-01-23 Thread lmuelle
Author: lmuelle
Date: 2006-01-23 09:56:04 + (Mon, 23 Jan 2006)
New Revision: 907

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=907

Log:
It's spelled sep_a_rator.

Modified:
   trunk/manpages-3/smb.conf.5.xml


Changeset:
Modified: trunk/manpages-3/smb.conf.5.xml
===
--- trunk/manpages-3/smb.conf.5.xml 2006-01-20 20:25:40 UTC (rev 906)
+++ trunk/manpages-3/smb.conf.5.xml 2006-01-23 09:56:04 UTC (rev 907)
@@ -422,7 +422,7 @@


%w
-   the winbind seperator.
+   the winbind separator.






svn commit: samba r13079 - in branches/SAMBA_4_0/source: . lib script

2006-01-23 Thread metze
Author: metze
Date: 2006-01-23 11:23:39 + (Mon, 23 Jan 2006)
New Revision: 13079

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13079

Log:
add SAMBA_VERSION_RELEASE_NICKNAME

if it's set in source/VERSION

smbd --version will print
4.0.0tp1 (Nickname)

metze
Modified:
   branches/SAMBA_4_0/source/VERSION
   branches/SAMBA_4_0/source/lib/version.c
   branches/SAMBA_4_0/source/script/mkversion.sh


Changeset:
Modified: branches/SAMBA_4_0/source/VERSION
===
--- branches/SAMBA_4_0/source/VERSION   2006-01-23 05:03:20 UTC (rev 13078)
+++ branches/SAMBA_4_0/source/VERSION   2006-01-23 11:23:39 UTC (rev 13079)
@@ -34,6 +34,16 @@
 SAMBA_VERSION_REVISION=
 
 
+# For 'tp' releases the version will be#
+#  #
+# ..tp  #
+#  #
+# e.g. SAMBA_VERSION_PRE_RELEASE=1 #
+#  ->  "4.0.0tp1"  #
+
+SAMBA_VERSION_TP_RELEASE=
+
+
 # For 'pre' releases the version will be   #
 #  #
 # ..pre#
@@ -66,6 +76,15 @@
 SAMBA_VERSION_IS_SVN_SNAPSHOT=yes
 
 
+# This is for specifying a release nickname#
+#  #
+# e.g. SAMBA_VERSION_RELEASE_NICKNAME="Nicky Nickname" #
+#  smbd --version will then give:  #
+#  ->  "4.0.0-tp1-VendorVersion (Nicky Nickname)"  #
+
+SAMBA_VERSION_RELEASE_NICKNAME=
+
+
 # This can be set by vendors if they want...   #
 # This can be a string constant or a function which#
 # returns a string (const char *)  #

Modified: branches/SAMBA_4_0/source/lib/version.c
===
--- branches/SAMBA_4_0/source/lib/version.c 2006-01-23 05:03:20 UTC (rev 
13078)
+++ branches/SAMBA_4_0/source/lib/version.c 2006-01-23 11:23:39 UTC (rev 
13079)
@@ -24,21 +24,33 @@
 
 const char *samba_version_string(void)
 {
-#ifndef SAMBA_VERSION_VENDOR_SUFFIX
-   return SAMBA_VERSION_OFFICIAL_STRING;
+   const char *official_string = SAMBA_VERSION_OFFICIAL_STRING;
+#ifdef SAMBA_VERSION_RELEASE_NICKNAME
+   const char *release_nickname = SAMBA_VERSION_RELEASE_NICKNAME;
 #else
+   const char *release_nickname = NULL;
+#endif
+#ifdef SAMBA_VERSION_VENDOR_SUFFIX
+   const char *vendor_suffix = SAMBA_VERSION_VENDOR_SUFFIX;
+#else
+   const char *vendor_suffix = NULL;
+#endif
static char *samba_version;
static BOOL init_samba_version;
 
-   if (init_samba_version)
+   if (init_samba_version) {
return samba_version;
+   }
 
-   samba_version = talloc_asprintf(
-   talloc_autofree_context(), "%s-%s",
-   SAMBA_VERSION_OFFICIAL_STRING,
-   SAMBA_VERSION_VENDOR_SUFFIX);
+   samba_version = talloc_asprintf(talloc_autofree_context(),
+   "%s%s%s%s%s%s",
+   official_string,
+   (vendor_suffix?"-":""),
+   (vendor_suffix?vendor_suffix:""),
+   (release_nickname?" (":""),
+   (release_nickname?release_nickname:""),
+   (release_nickname?")":""));
 
init_samba_version = True;
return samba_version;
-#endif
 }

Modified: branches/SAMBA_4_0/source/script/mkversion.sh
===
--- branches/SAMBA_4_0/source/script/mkversion.sh   2006-01-23 05:03:20 UTC 
(rev 13078)
+++ branches/SAMBA_4_0/source/script/mkversion.sh   2006-01-23 11:23:39 UTC 
(rev 13079)
@@ -19,14 +19,16 @@
 
 SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' 
$SOURCE_DIR$VERSION_FILE`
 
+SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
+
 SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
 
 SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
 
-SAMBA_VERSION_TP_RELEASE=`sed -n 's/^SAMBA_VERSION_TP_RELEASE=//p' 
$SOURCE_DIR$VERSION_FILE`
-
 SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' 
$SOURCE_DIR$VERSION_FILE`
 
+SAMBA_VERSION_RELEASE_NICKNAME=`sed -n 's/^SAMBA_VERSION_RELEASE_NICKNAME=//p' 
$SOURCE_DIR$VERSION_FILE`
+
 

svn commit: samba r13080 - in branches/SAMBA_4_0/source/wrepl_server: .

2006-01-23 Thread metze
Author: metze
Date: 2006-01-23 12:55:22 + (Mon, 23 Jan 2006)
New Revision: 13080

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13080

Log:
fix crash bug

metze
Modified:
   branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c


Changeset:
Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c
===
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c   2006-01-23 
11:23:39 UTC (rev 13079)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c   2006-01-23 
12:55:22 UTC (rev 13080)
@@ -323,7 +323,7 @@
}
}
} else if (NT_STATUS_IS_OK(status) && rec->type == WREPL_TYPE_GROUP) {
-   if (s->r.out.num_addrs != 1 || strcmp(s->r.out.addrs[i].addr, 
"255.255.255.255") != 0) {
+   if (s->r.out.num_addrs != 1 || strcmp(s->r.out.addrs[0].addr, 
"255.255.255.255") != 0) {
different = True;
}
}



Re: svn commit: samba r13058 - branches/SAMBA_3_0/source/lib trunk/source/lib

2006-01-23 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
> Author: lmuelle
> Date: 2006-01-20 20:22:23 + (Fri, 20 Jan 2006)
> New Revision: 13058
> 
> WebSVN: 
> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13058
> 
> Log:
> Add %w macro for the winbind seperator which allows us for example
> valid users = %S, %D%w%S

Lars,

Why do we need a variable for this?  The admin knows the
separator.  Other than simple convience, is there an advantage
here I'm missing?  Even on the [homes] share I'm not sure I see
it.  The share gets renamed to %U.  Not %D+%U.





cheers, jerry

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD1OCEIR7qMdg1EfYRAhpDAKCdHfWFpE8DV4Z6BrHstJWze2AxIgCg9D6H
g6myJ5y6CKKIKPWfSEPvjaU=
=eLDm
-END PGP SIGNATURE-


Re: svn commit: samba r13071 - in branches/SAMBA_4_0/source: build/m4 include/system

2006-01-23 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schrieb:
> Author: jpeach
> Date: 2006-01-22 23:48:56 + (Sun, 22 Jan 2006)
> New Revision: 13071
> 
> WebSVN: 
> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13071
> 
> Log:
> Work around a really annoying compiler warning where header file
> ordering causes MIN and MAX to be redefined.

Hi James,

the build on us4 is broken now...

metze
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD1OHdm70gjA5TCD8RAtYcAKCNrB7LOl/7hgj1ygCwKaR3AgjZWQCeOvpH
mBHSLFiQegVv5eaJ42muZ74=
=P4sN
-END PGP SIGNATURE-


svn commit: samba r13081 - branches/SAMBA_3_0/source/nmbd branches/SAMBA_3_0/source/rpc_server branches/SAMBA_3_0/source/utils trunk/source/nmbd

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 14:02:17 + (Mon, 23 Jan 2006)
New Revision: 13081

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13081

Log:
correct fix for the segv in nmbd caused by a double free on namerec.


Modified:
   branches/SAMBA_3_0/source/nmbd/nmbd_namelistdb.c
   branches/SAMBA_3_0/source/nmbd/nmbd_winsserver.c
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0/source/utils/status.c
   trunk/source/nmbd/nmbd_namelistdb.c
   trunk/source/nmbd/nmbd_winsserver.c


Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd_namelistdb.c
===
--- branches/SAMBA_3_0/source/nmbd/nmbd_namelistdb.c2006-01-23 12:55:22 UTC 
(rev 13080)
+++ branches/SAMBA_3_0/source/nmbd/nmbd_namelistdb.c2006-01-23 14:02:17 UTC 
(rev 13081)
@@ -80,14 +80,13 @@
 void remove_name_from_namelist(struct subnet_record *subrec, 
struct name_record *namerec )
 {
-   if (subrec == wins_server_subnet) {
+   if (subrec == wins_server_subnet) 
remove_name_from_wins_namelist(namerec);
-   return;
-   } 
+   else {
+   subrec->namelist_changed = True;
+   DLIST_REMOVE(subrec->namelist, namerec);
+   }
 
-   subrec->namelist_changed = True;
-
-   DLIST_REMOVE(subrec->namelist, namerec);
SAFE_FREE(namerec->data.ip);
ZERO_STRUCTP(namerec);
SAFE_FREE(namerec);

Modified: branches/SAMBA_3_0/source/nmbd/nmbd_winsserver.c
===
--- branches/SAMBA_3_0/source/nmbd/nmbd_winsserver.c2006-01-23 12:55:22 UTC 
(rev 13080)
+++ branches/SAMBA_3_0/source/nmbd/nmbd_winsserver.c2006-01-23 14:02:17 UTC 
(rev 13081)
@@ -290,8 +290,9 @@
 
DLIST_REMOVE(wins_server_subnet->namelist, namerec);
SAFE_FREE(namerec->data.ip);
-   ZERO_STRUCTP(namerec);
-   SAFE_FREE(namerec);
+
+   /* namerec must be freed by the caller */
+
return (ret == 0) ? True : False;
 }
 

Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
12:55:22 UTC (rev 13080)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:02:17 UTC (rev 13081)
@@ -2,8 +2,8 @@
  *  Unix SMB/CIFS implementation.
  *  RPC Pipe client / server routines
  *  Copyright (C) Andrew Tridgell  1992-1997,
- *  Copyright (C) Jeremy Allison   2001.
- *  Copyright (C) Nigel Williams   2001.
+ *  Copyright (C) Jeremy Allison   2001.
+ *  Copyright (C) Nigel Williams   2001.
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1539,6 +1539,7 @@
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
BOOL is_disk_op = False;
+   int max_connections = 0;
 
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
 
@@ -1583,6 +1584,7 @@
unistr2_to_ascii(comment, 
&q_u->info.share.info2.info_2_str.uni_remark, sizeof(comment));
unistr2_to_ascii(pathname, 
&q_u->info.share.info2.info_2_str.uni_path, sizeof(pathname));
type = q_u->info.share.info2.info_2.type;
+   max_connections = (q_u->info.share.info2.max_uses == 
0x) ? 0 : q_u->info.share.info2.max_uses;
psd = NULL;
break;
 #if 0
@@ -1658,8 +1660,8 @@
return WERR_ACCESS_DENIED;
}
 
-   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" 
\"%s\"",
-   lp_change_share_cmd(), dyn_CONFIGFILE, 
share_name, path, comment);
+   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" 
\"%s\" %d",
+   lp_change_share_cmd(), dyn_CONFIGFILE, 
share_name, path, comment, max_connections ); 
 
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));

@@ -1951,16 +1953,17 @@
TIME_OF_DAY_INFO *tod;
struct tm *t;
time_t unixdate = time(NULL);
+
/* We do this call first as if we do it *after* the gmtime call
   it overwrites the pointed-to values. JRA */
+
uint32 zone = get_time_zone(unixdate)/60;
 
-   tod = TALLOC_P(p->mem_ctx, TIME_OF_DAY_INFO);
-   if (!tod)
+   DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
+
+   if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, TIME_OF_DAY_INFO)) )
return WERR_NOMEM;
 
-   ZERO_STRUCTP(tod);
- 
r_u->tod = tod;
r_u->ptr_srv_tod = 0x1;
r_u->status = WERR_OK;

Modified: branches/SAMBA_3_0/s

svn commit: samba r13082 - in branches/SAMBA_3_0/source: rpc_server utils

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 14:04:40 + (Mon, 23 Jan 2006)
New Revision: 13082

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13082

Log:
revert an accidentally commited patch (still in progress)
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0/source/utils/status.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:02:17 UTC (rev 13081)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:04:40 UTC (rev 13082)
@@ -2,8 +2,8 @@
  *  Unix SMB/CIFS implementation.
  *  RPC Pipe client / server routines
  *  Copyright (C) Andrew Tridgell  1992-1997,
- *  Copyright (C) Jeremy Allison   2001.
- *  Copyright (C) Nigel Williams   2001.
+ *  Copyright (C) Jeremy Allison   2001.
+ *  Copyright (C) Nigel Williams   2001.
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1539,7 +1539,6 @@
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
BOOL is_disk_op = False;
-   int max_connections = 0;
 
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
 
@@ -1584,7 +1583,6 @@
unistr2_to_ascii(comment, 
&q_u->info.share.info2.info_2_str.uni_remark, sizeof(comment));
unistr2_to_ascii(pathname, 
&q_u->info.share.info2.info_2_str.uni_path, sizeof(pathname));
type = q_u->info.share.info2.info_2.type;
-   max_connections = (q_u->info.share.info2.max_uses == 
0x) ? 0 : q_u->info.share.info2.max_uses;
psd = NULL;
break;
 #if 0
@@ -1660,8 +1658,8 @@
return WERR_ACCESS_DENIED;
}
 
-   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" 
\"%s\" %d",
-   lp_change_share_cmd(), dyn_CONFIGFILE, 
share_name, path, comment, max_connections ); 
+   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" 
\"%s\"",
+   lp_change_share_cmd(), dyn_CONFIGFILE, 
share_name, path, comment);
 
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));

@@ -1953,17 +1951,16 @@
TIME_OF_DAY_INFO *tod;
struct tm *t;
time_t unixdate = time(NULL);
-
/* We do this call first as if we do it *after* the gmtime call
   it overwrites the pointed-to values. JRA */
-
uint32 zone = get_time_zone(unixdate)/60;
 
-   DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
-
-   if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, TIME_OF_DAY_INFO)) )
+   tod = TALLOC_P(p->mem_ctx, TIME_OF_DAY_INFO);
+   if (!tod)
return WERR_NOMEM;
 
+   ZERO_STRUCTP(tod);
+ 
r_u->tod = tod;
r_u->ptr_srv_tod = 0x1;
r_u->status = WERR_OK;

Modified: branches/SAMBA_3_0/source/utils/status.c
===
--- branches/SAMBA_3_0/source/utils/status.c2006-01-23 14:02:17 UTC (rev 
13081)
+++ branches/SAMBA_3_0/source/utils/status.c2006-01-23 14:04:40 UTC (rev 
13082)
@@ -103,13 +103,13 @@
static int count;
if (count==0) {
d_printf("Locked files:\n");
-   d_printf("Pid  DenyMode   Access  R/WOplock 
  SharePath   Name\n");
-   
d_printf("\n");
+   d_printf("PidDenyMode   Access  R/WOplock   
SharePath   Name\n");
+   
d_printf("--\n");
}
count++;
 
if (Ucrit_checkPid(procid_to_pid(&e->pid))) {
-   d_printf("%-11s  ",procid_str_static(&e->pid));
+   d_printf("%s  ",procid_str_static(&e->pid));
switch (map_share_mode_to_deny_mode(e->share_access,
e->private_options)) {
case DENY_NONE: d_printf("DENY_NONE  "); break;
@@ -166,7 +166,7 @@
}
count++;
 
-   d_printf("%08s   %05x:%05x%s  %9.0f   %9.0f\n", 
+   d_printf("%s   %05x:%05x%s  %9.0f   %9.0f\n", 
   procid_str_static(&pid), (int)dev, (int)ino, 
   lock_type==READ_LOCK?"R":"W",
   (double)start, (double)size);



svn commit: samba r13083 - branches/SAMBA_3_0/source/utils trunk/source/utils

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 14:26:48 + (Mon, 23 Jan 2006)
New Revision: 13083

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13083

Log:
patch suggested by Adam Nielsen for better smbstatus formatting


Modified:
   branches/SAMBA_3_0/source/utils/status.c
   trunk/source/utils/status.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/status.c
===
--- branches/SAMBA_3_0/source/utils/status.c2006-01-23 14:04:40 UTC (rev 
13082)
+++ branches/SAMBA_3_0/source/utils/status.c2006-01-23 14:26:48 UTC (rev 
13083)
@@ -103,13 +103,13 @@
static int count;
if (count==0) {
d_printf("Locked files:\n");
-   d_printf("PidDenyMode   Access  R/WOplock   
SharePath   Name\n");
-   
d_printf("--\n");
+   d_printf("Pid  DenyMode   Access  R/WOplock 
  SharePath   Name\n");
+   
d_printf("\n");
}
count++;
 
if (Ucrit_checkPid(procid_to_pid(&e->pid))) {
-   d_printf("%s  ",procid_str_static(&e->pid));
+   d_printf("%-11s  ",procid_str_static(&e->pid));
switch (map_share_mode_to_deny_mode(e->share_access,
e->private_options)) {
case DENY_NONE: d_printf("DENY_NONE  "); break;
@@ -166,7 +166,7 @@
}
count++;
 
-   d_printf("%s   %05x:%05x%s  %9.0f   %9.0f\n", 
+   d_printf("%08s   %05x:%05x%s  %9.0f   %9.0f\n", 
   procid_str_static(&pid), (int)dev, (int)ino, 
   lock_type==READ_LOCK?"R":"W",
   (double)start, (double)size);

Modified: trunk/source/utils/status.c
===
--- trunk/source/utils/status.c 2006-01-23 14:04:40 UTC (rev 13082)
+++ trunk/source/utils/status.c 2006-01-23 14:26:48 UTC (rev 13083)
@@ -103,13 +103,13 @@
static int count;
if (count==0) {
d_printf("Locked files:\n");
-   d_printf("PidDenyMode   Access  R/WOplock   
SharePath   Name\n");
-   
d_printf("--\n");
+   d_printf("Pid  DenyMode   Access  R/WOplock 
  SharePath   Name\n");
+   
d_printf("\n");
}
count++;
 
if (Ucrit_checkPid(procid_to_pid(&e->pid))) {
-   d_printf("%s  ",procid_str_static(&e->pid));
+   d_printf("%-11s  ",procid_str_static(&e->pid));
switch (map_share_mode_to_deny_mode(e->share_access,
e->private_options)) {
case DENY_NONE: d_printf("DENY_NONE  "); break;
@@ -166,7 +166,7 @@
}
count++;
 
-   d_printf("%s   %05x:%05x%s  %9.0f   %9.0f\n", 
+   d_printf("%08s   %05x:%05x%s  %9.0f   %9.0f\n", 
   procid_str_static(&pid), (int)dev, (int)ino, 
   lock_type==READ_LOCK?"R":"W",
   (double)start, (double)size);



svn commit: samba r13085 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 14:34:26 + (Mon, 23 Jan 2006)
New Revision: 13085

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13085

Log:
hook the max connections spin box in the share properties MMC plugin
dialog to the 'max connections' smb.conf parameter.  Also added the max
uses int from the SHARE_INFO_2 structure to the 'modify share command'


Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
   trunk/source/rpc_server/srv_srvsvc_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:29:10 UTC (rev 13084)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:34:26 UTC (rev 13085)
@@ -2,8 +2,8 @@
  *  Unix SMB/CIFS implementation.
  *  RPC Pipe client / server routines
  *  Copyright (C) Andrew Tridgell  1992-1997,
- *  Copyright (C) Jeremy Allison   2001.
- *  Copyright (C) Nigel Williams   2001.
+ *  Copyright (C) Jeremy Allison   2001.
+ *  Copyright (C) Nigel Williams   2001.
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -109,6 +109,8 @@
pstring remark;
pstring path;
pstring passwd;
+   int max_connections = lp_max_connections(snum);
+   uint32 max_uses = max_connections!=0 ? max_connections : 0x;
 
char *net_name = lp_servicename(snum);
pstrcpy(remark, lp_comment(snum));
@@ -125,7 +127,7 @@
 
pstrcpy(passwd, "");
 
-   init_srv_share_info2(&sh2->info_2, net_name, get_share_type(snum), 
remark, 0, 0x, 1, path, passwd);
+   init_srv_share_info2(&sh2->info_2, net_name, get_share_type(snum), 
remark, 0, max_uses, 1, path, passwd);
init_srv_share_info2_str(&sh2->info_2_str, net_name, remark, path, 
passwd);
 }
 
@@ -1539,6 +1541,7 @@
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
BOOL is_disk_op = False;
+   int max_connections = 0;
 
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
 
@@ -1583,6 +1586,7 @@
unistr2_to_ascii(comment, 
&q_u->info.share.info2.info_2_str.uni_remark, sizeof(comment));
unistr2_to_ascii(pathname, 
&q_u->info.share.info2.info_2_str.uni_path, sizeof(pathname));
type = q_u->info.share.info2.info_2.type;
+   max_connections = (q_u->info.share.info2.info_2.max_uses == 
0x) ? 0 : q_u->info.share.info2.info_2.max_uses;
psd = NULL;
break;
 #if 0
@@ -1651,15 +1655,16 @@
 
/* Only call modify function if something changed. */

-   if (strcmp(path, lp_pathname(snum)) || strcmp(comment, 
lp_comment(snum)) ) 
+   if (strcmp(path, lp_pathname(snum)) || strcmp(comment, 
lp_comment(snum)) 
+   || (lp_max_connections(snum) != max_connections) ) 
{
if (!lp_change_share_cmd() || !*lp_change_share_cmd()) {
DEBUG(10,("_srv_net_share_set_info: No change share 
command\n"));
return WERR_ACCESS_DENIED;
}
 
-   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" 
\"%s\"",
-   lp_change_share_cmd(), dyn_CONFIGFILE, 
share_name, path, comment);
+   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" 
\"%s\" %d",
+   lp_change_share_cmd(), dyn_CONFIGFILE, 
share_name, path, comment, max_connections ); 
 
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));

@@ -1951,16 +1956,17 @@
TIME_OF_DAY_INFO *tod;
struct tm *t;
time_t unixdate = time(NULL);
+
/* We do this call first as if we do it *after* the gmtime call
   it overwrites the pointed-to values. JRA */
+
uint32 zone = get_time_zone(unixdate)/60;
 
-   tod = TALLOC_P(p->mem_ctx, TIME_OF_DAY_INFO);
-   if (!tod)
+   DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
+
+   if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, TIME_OF_DAY_INFO)) )
return WERR_NOMEM;
 
-   ZERO_STRUCTP(tod);
- 
r_u->tod = tod;
r_u->ptr_srv_tod = 0x1;
r_u->status = WERR_OK;

Modified: trunk/source/rpc_server/srv_srvsvc_nt.c
===
--- trunk/source/rpc_server/srv_srvsvc_nt.c 2006-01-23 14:29:10 UTC (rev 
13084)
+++ trunk/source/rpc_server/srv_srvsvc_nt.c 2006-01-23 14:34:26 UTC (rev 
13085)
@@ -2,8 +2,8 @@
  *  Unix SMB/CIFS implementation.
  *  RPC Pipe client / server routines
  *  Copyright (C) Andrew Tridgell  1992-1997,

svn commit: samba r13086 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 14:47:55 + (Mon, 23 Jan 2006)
New Revision: 13086

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13086

Log:
hooking max connections into 'add share' as well (although the WinXP UI doesn't 
give you a way to set the value on add
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
   trunk/source/rpc_server/srv_srvsvc_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:34:26 UTC (rev 13085)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-01-23 
14:47:55 UTC (rev 13086)
@@ -1711,7 +1711,8 @@
 }
 
 /***
- Net share add. Call 'add_share_command "sharename" "pathname" "comment" "read 
only = xxx"'
+ Net share add. Call 'add_share_command "sharename" "pathname" 
+ "comment" "max connections = "
 /
 
 WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, 
SRV_R_NET_SHARE_ADD *r_u)
@@ -1728,6 +1729,7 @@
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
BOOL is_disk_op;
+   int max_connections = 0;
 
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
 
@@ -1756,6 +1758,7 @@
unistr2_to_ascii(share_name, 
&q_u->info.share.info2.info_2_str.uni_netname, sizeof(share_name));
unistr2_to_ascii(comment, 
&q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name));
unistr2_to_ascii(pathname, 
&q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name));
+   max_connections = (q_u->info.share.info2.info_2.max_uses == 
0x) ? 0 : q_u->info.share.info2.info_2.max_uses;
type = q_u->info.share.info2.info_2.type;
break;
case 501:
@@ -1792,9 +1795,8 @@
return WERR_INVALID_NAME;
}
 
-   if ( strequal(share_name,"IPC$") 
-   || ( lp_enable_asu_support() && strequal(share_name,"ADMIN$") )
-   || strequal(share_name,"global") )
+   if ( strequal(share_name,"IPC$") || strequal(share_name,"global")
+   || ( lp_enable_asu_support() && strequal(share_name,"ADMIN$") ) 
)
{
return WERR_ACCESS_DENIED;
}
@@ -1818,8 +1820,13 @@
string_replace(path, '"', ' ');
string_replace(comment, '"', ' ');
 
-   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
-   lp_add_share_cmd(), dyn_CONFIGFILE, share_name, path, 
comment);
+   slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\" 
%d",
+   lp_add_share_cmd(), 
+   dyn_CONFIGFILE, 
+   share_name, 
+   path, 
+   comment, 
+   max_connections);

DEBUG(10,("_srv_net_share_add: Running [%s]\n", command ));


Modified: trunk/source/rpc_server/srv_srvsvc_nt.c
===
--- trunk/source/rpc_server/srv_srvsvc_nt.c 2006-01-23 14:34:26 UTC (rev 
13085)
+++ trunk/source/rpc_server/srv_srvsvc_nt.c 2006-01-23 14:47:55 UTC (rev 
13086)
@@ -1517,7 +1517,8 @@
 }
 
 /***
- Net share add. Call 'add_share_command "sharename" "pathname" "comment" "read 
only = xxx"'
+ Net share add. Call 'add_share_command "sharename" "pathname" 
+ "comment" "max connections = "
 /
 
 WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, 
SRV_R_NET_SHARE_ADD *r_u)
@@ -1534,6 +1535,7 @@
SEC_DESC *psd = NULL;
SE_PRIV se_diskop = SE_DISK_OPERATOR;
BOOL is_disk_op;
+   int max_connections = 0;
 
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
 
@@ -1562,6 +1564,7 @@
unistr2_to_ascii(share_name, 
&q_u->info.share.info2.info_2_str.uni_netname, sizeof(share_name));
unistr2_to_ascii(comment, 
&q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name));
unistr2_to_ascii(pathname, 
&q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name));
+   max_connections = (q_u->info.share.info2.info_2.max_uses == 
0x) ? 0 : q_u->info.share.info2.info_2.max_uses;
type = q_u->info.share.info2.info_2.type;
break;
case 501:
@@ -1598,9 +1601,8 @@
return WERR_INVALID_NAME;
}
 
-   if ( strequal(share_name,"IPC$") 
-   || ( lp_enable_asu_support() && strequal(share_name,"ADMIN$") )
-   || strequal(share_name,"global") )
+   if ( strequal(s

svn commit: samba r13084 - in branches/SAMBA_4_0/source/scripting/libjs: .

2006-01-23 Thread metze
Author: metze
Date: 2006-01-23 14:29:10 + (Mon, 23 Jan 2006)
New Revision: 13084

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13084

Log:
fix 'make test'!

I would sugguest to run 'make test && make valgrind' before each commit
at this stage...

metze
Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-23 
14:26:48 UTC (rev 13083)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-23 
14:29:10 UTC (rev 13084)
@@ -551,11 +551,6 @@
return false;
}
 
-   if (lp.get("server role") == "pdc") {
-   message("server role must not be set to 'pdc' during the 
install\n");
-   return false;
-   }
-
return true;
 }
 



svn commit: samba r13087 - in branches/SAMBA_4_0/source/nbt_server/wins: .

2006-01-23 Thread metze
Author: metze
Date: 2006-01-23 14:54:10 + (Mon, 23 Jan 2006)
New Revision: 13087

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13087

Log:
don't store timestamps for static records
(only a per record timestamp when it's not active)

metze
Modified:
   branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c


Changeset:
Modified: branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c
===
--- branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c  2006-01-23 14:47:55 UTC 
(rev 13086)
+++ branches/SAMBA_4_0/source/nbt_server/wins/winsdb.c  2006-01-23 14:54:10 UTC 
(rev 13087)
@@ -310,22 +310,30 @@
 
 /*
  encode the winsdb_addr("address") attribute like this:
+ non-static record:
  "172.31.1.1;winsOwner:172.31.9.202;expireTime:20050923032330.0Z;"
+ static record:
+ "172.31.1.1"
 */
-static int ldb_msg_add_winsdb_addr(struct ldb_message *msg, 
+static int ldb_msg_add_winsdb_addr(struct ldb_message *msg, struct 
winsdb_record *rec,
   const char *attr_name, struct winsdb_addr 
*addr)
 {
struct ldb_val val;
const char *str;
-   char *expire_time;
 
-   expire_time = ldb_timestring(msg, addr->expire_time);
-   if (!expire_time) return -1;
-   str = talloc_asprintf(msg, "%s;winsOwner:%s;expireTime:%s;",
- addr->address, addr->wins_owner,
- expire_time);
-   talloc_free(expire_time);
-   if (!str) return -1;
+   if (rec->is_static) {
+   str = talloc_strdup(msg, addr->address);
+   if (!str) return -1;
+   } else {
+   char *expire_time;
+   expire_time = ldb_timestring(msg, addr->expire_time);
+   if (!expire_time) return -1;
+   str = talloc_asprintf(msg, "%s;winsOwner:%s;expireTime:%s;",
+ addr->address, addr->wins_owner,
+ expire_time);
+   talloc_free(expire_time);
+   if (!str) return -1;
+   }
 
val.data = discard_const_p(uint8_t, str);
val.length = strlen(str);
@@ -617,13 +625,6 @@
struct ldb_message *msg = ldb_msg_new(mem_ctx);
if (msg == NULL) goto failed;
 
-   if (rec->is_static && rec->state == WREPL_STATE_ACTIVE) {
-   rec->expire_time = get_time_t_max();
-   for (i=0;rec->addresses[i];i++) {
-   rec->addresses[i]->expire_time = rec->expire_time;
-   }
-   }
-
/* make sure we don't put in corrupted records */
addr_count = winsdb_addr_list_length(rec->addresses);
if (rec->state == WREPL_STATE_ACTIVE && addr_count == 0) {
@@ -652,12 +653,15 @@
ret |= ldb_msg_add_fmt(msg, "recordState", "%u", rec->state);
ret |= ldb_msg_add_fmt(msg, "nodeType", "%u", rec->node);
ret |= ldb_msg_add_fmt(msg, "isStatic", "%u", rec->is_static);
-   ret |= ldb_msg_add_string(msg, "expireTime", expire_time);
+   ret |= ldb_msg_add_empty(msg, "expireTime", 0);
+   if (!(rec->is_static && rec->state == WREPL_STATE_ACTIVE)) {
+   ret |= ldb_msg_add_string(msg, "expireTime", expire_time);
+   }
ret |= ldb_msg_add_fmt(msg, "versionID", "%llu", (long 
long)rec->version);
ret |= ldb_msg_add_string(msg, "winsOwner", rec->wins_owner);
ret |= ldb_msg_add_empty(msg, "address", 0);
for (i=0;rec->addresses[i];i++) {
-   ret |= ldb_msg_add_winsdb_addr(msg, "address", 
rec->addresses[i]);
+   ret |= ldb_msg_add_winsdb_addr(msg, rec, "address", 
rec->addresses[i]);
}
ret |= ldb_msg_add_empty(msg, "registeredBy", 0);
if (rec->registered_by) {



svn commit: samba r13088 - in branches/SAMBA_4_0/source/wrepl_server: .

2006-01-23 Thread metze
Author: metze
Date: 2006-01-23 16:04:27 + (Mon, 23 Jan 2006)
New Revision: 13088

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13088

Log:
- handle non-active static entries
- improve verifiying a replica with a remote wins server
  we now take the ownership of replica records that doesn't match
  the answer from the wins owner and make the record tombstone.
  this hopefully causes the original wins owner to propagate its
  new record, so that it will be replicated back to us

metze
Modified:
   branches/SAMBA_4_0/source/wrepl_server/wrepl_scavenging.c


Changeset:
Sorry, the patch is too large (265 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13088


Re: svn commit: samba r13058 - branches/SAMBA_3_0/source/lib trunk/source/lib

2006-01-23 Thread Jeremy Allison
On Mon, Jan 23, 2006 at 07:56:20AM -0600, Gerald (Jerry) Carter wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> [EMAIL PROTECTED] wrote:
> > Author: lmuelle
> > Date: 2006-01-20 20:22:23 + (Fri, 20 Jan 2006)
> > New Revision: 13058
> > 
> > WebSVN: 
> > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13058
> > 
> > Log:
> > Add %w macro for the winbind seperator which allows us for example
> > valid users = %S, %D%w%S
> 
> Lars,
> 
> Why do we need a variable for this?  The admin knows the
> separator.  Other than simple convience, is there an advantage
> here I'm missing?  Even on the [homes] share I'm not sure I see
> it.  The share gets renamed to %U.  Not %D+%U.

It's to allow the separator to be  set in one place, then
all other instances of it in the smb.conf or included files
don't need to be changed.

It's not a big invasive change and seems to make admin
easier so I am in favour really.

Jeremy.


Re: svn commit: samba r13058 - branches/SAMBA_3_0/source/lib trunk/source/lib

2006-01-23 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeremy Allison wrote:

> It's to allow the separator to be  set in one place, then
> all other instances of it in the smb.conf or included files
> don't need to be changed.
> 
> It's not a big invasive change and seems to make admin
> easier so I am in favour really.

I get that anyways. like you said, it's a minor change.





cheers, jerry
=
I live in a Reply-to-All world.   ---
Samba--- http://www.samba.org
Centeris ---  http://www.centeris.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD1RTsIR7qMdg1EfYRAuGbAKCZNdozggqQdskULJ779wb3ynFD6QCgmVsM
nG1G6W46EG+MlLGaywxRZuw=
=l4KD
-END PGP SIGNATURE-


svn commit: samba r13089 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 21:57:36 + (Mon, 23 Jan 2006)
New Revision: 13089

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13089

Log:
quick fix to work around building ilbnss_winbind.so on SOlaris when 
--enable-developer is specified
Modified:
   branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c
   trunk/source/nsswitch/winbind_nss_solaris.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c2006-01-23 
16:04:27 UTC (rev 13088)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_solaris.c2006-01-23 
21:57:36 UTC (rev 13089)
@@ -25,6 +25,8 @@
   Boston, MA 02111-1307, USA.
 */
 
+#undef DEVELOPER
+
 #include 
 #include 
 #include 

Modified: trunk/source/nsswitch/winbind_nss_solaris.c
===
--- trunk/source/nsswitch/winbind_nss_solaris.c 2006-01-23 16:04:27 UTC (rev 
13088)
+++ trunk/source/nsswitch/winbind_nss_solaris.c 2006-01-23 21:57:36 UTC (rev 
13089)
@@ -25,6 +25,8 @@
   Boston, MA 02111-1307, USA.
 */
 
+#undef DEVELOPER
+
 #include 
 #include 
 #include 



svn commit: samba r13090 - in trunk/source/utils: .

2006-01-23 Thread jra
Author: jra
Date: 2006-01-23 21:57:56 + (Mon, 23 Jan 2006)
New Revision: 13090

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13090

Log:
Fix gcc warning about using '0' with %s.
Jeremy.

Modified:
   trunk/source/utils/status.c


Changeset:
Modified: trunk/source/utils/status.c
===
--- trunk/source/utils/status.c 2006-01-23 21:57:36 UTC (rev 13089)
+++ trunk/source/utils/status.c 2006-01-23 21:57:56 UTC (rev 13090)
@@ -166,7 +166,7 @@
}
count++;
 
-   d_printf("%08s   %05x:%05x%s  %9.0f   %9.0f\n", 
+   d_printf("%8s   %05x:%05x%s  %9.0f   %9.0f\n", 
   procid_str_static(&pid), (int)dev, (int)ino, 
   lock_type==READ_LOCK?"R":"W",
   (double)start, (double)size);



svn commit: samba r13091 - in branches/SAMBA_3_0/source/utils: .

2006-01-23 Thread jra
Author: jra
Date: 2006-01-23 21:57:58 + (Mon, 23 Jan 2006)
New Revision: 13091

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13091

Log:
Fix gcc warning about using '0' with %s.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/utils/status.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/status.c
===
--- branches/SAMBA_3_0/source/utils/status.c2006-01-23 21:57:56 UTC (rev 
13090)
+++ branches/SAMBA_3_0/source/utils/status.c2006-01-23 21:57:58 UTC (rev 
13091)
@@ -166,7 +166,7 @@
}
count++;
 
-   d_printf("%08s   %05x:%05x%s  %9.0f   %9.0f\n", 
+   d_printf("%8s   %05x:%05x%s  %9.0f   %9.0f\n", 
   procid_str_static(&pid), (int)dev, (int)ino, 
   lock_type==READ_LOCK?"R":"W",
   (double)start, (double)size);



svn commit: samba r13092 - in trunk/source: lib nsswitch

2006-01-23 Thread jra
Author: jra
Date: 2006-01-23 22:00:30 + (Mon, 23 Jan 2006)
New Revision: 13092

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13092

Log:
Add code to remove a race condition when we're fork'ing a new
child and changing message disposition.
Jeremy.

Modified:
   trunk/source/lib/messages.c
   trunk/source/nsswitch/winbindd_dual.c


Changeset:
Modified: trunk/source/lib/messages.c
===
--- trunk/source/lib/messages.c 2006-01-23 21:57:58 UTC (rev 13091)
+++ trunk/source/lib/messages.c 2006-01-23 22:00:30 UTC (rev 13092)
@@ -604,4 +604,19 @@
*n_sent = msg_all.n_sent;
return True;
 }
+
+/*
+ * Block and unblock receiving of messages. Allows removal of race conditions
+ * when doing a fork and changing message disposition.
+ */
+
+void message_block(void)
+{
+   BlockSignals(True, SIGUSR1);
+}
+
+void message_unblock(void)
+{
+   BlockSignals(False, SIGUSR1);
+}
 /** @} **/

Modified: trunk/source/nsswitch/winbindd_dual.c
===
--- trunk/source/nsswitch/winbindd_dual.c   2006-01-23 21:57:58 UTC (rev 
13091)
+++ trunk/source/nsswitch/winbindd_dual.c   2006-01-23 22:00:30 UTC (rev 
13092)
@@ -557,10 +557,15 @@
ZERO_STRUCT(state);
state.pid = getpid();
 
+   /* Ensure we don't process messages whilst we're
+  changing the disposition for the child. */
+   message_block();
+
child->pid = sys_fork();
 
if (child->pid == -1) {
DEBUG(0, ("Could not fork: %s\n", strerror(errno)));
+   message_unblock();
return False;
}
 
@@ -573,6 +578,8 @@
child->event.flags = 0;
child->requests = NULL;
add_fd_event(&child->event);
+   /* We're ok with online/offline messages now. */
+   message_unblock();
return True;
}
 
@@ -600,6 +607,9 @@
message_deregister(MSG_WINBIND_OFFLINE);
message_deregister(MSG_WINBIND_ONLINE);
 
+   /* The child is ok with online/offline messages now. */
+   message_unblock();
+
child->mem_ctx = talloc_init("child_mem_ctx");
if (child->mem_ctx == NULL) {
return False;



svn commit: samba r13093 - branches/SAMBA_3_0/source branches/SAMBA_3_0/source/lib branches/SAMBA_3_0/source/script trunk/source trunk/source/lib trunk/source/script

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-23 22:02:52 + (Mon, 23 Jan 2006)
New Revision: 13093

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13093

Log:
adding vendor patch level string as announced on samba-technical ml
Modified:
   branches/SAMBA_3_0/source/VERSION
   branches/SAMBA_3_0/source/lib/version.c
   branches/SAMBA_3_0/source/script/mkversion.sh
   trunk/source/VERSION
   trunk/source/lib/version.c
   trunk/source/script/mkversion.sh


Changeset:
Sorry, the patch is too large (263 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13093


svn commit: samba r13094 - in trunk/source/include: .

2006-01-23 Thread jra
Author: jra
Date: 2006-01-23 22:32:56 + (Mon, 23 Jan 2006)
New Revision: 13094

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13094

Log:
Fix warnings assigning int to a size_t.
Jeremy.

Modified:
   trunk/source/include/auth.h
   trunk/source/include/smb.h


Changeset:
Modified: trunk/source/include/auth.h
===
--- trunk/source/include/auth.h 2006-01-23 22:02:52 UTC (rev 13093)
+++ trunk/source/include/auth.h 2006-01-23 22:32:56 UTC (rev 13094)
@@ -51,7 +51,7 @@
gid_t gid;

/* This groups info is needed for when we become_user() for this uid */
-   int n_groups;
+   size_t n_groups;
gid_t *groups;

/* NT group information taken from the info3 structure */

Modified: trunk/source/include/smb.h
===
--- trunk/source/include/smb.h  2006-01-23 22:02:52 UTC (rev 13093)
+++ trunk/source/include/smb.h  2006-01-23 22:32:56 UTC (rev 13094)
@@ -544,7 +544,7 @@
/* following groups stuff added by ih */
 
/* This groups info is valid for the user that *opened* the connection 
*/
-   int ngroups;
+   size_t ngroups;
gid_t *groups;
NT_USER_TOKEN *nt_user_token;




svn commit: samba r13095 - in branches/SAMBA_3_0/source: include smbd

2006-01-23 Thread jra
Author: jra
Date: 2006-01-23 23:19:31 + (Mon, 23 Jan 2006)
New Revision: 13095

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13095

Log:
Fix warnings assigning int to a size_t.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/auth.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/smbd/service.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/auth.h
===
--- branches/SAMBA_3_0/source/include/auth.h2006-01-23 22:32:56 UTC (rev 
13094)
+++ branches/SAMBA_3_0/source/include/auth.h2006-01-23 23:19:31 UTC (rev 
13095)
@@ -58,7 +58,7 @@
gid_t gid;

/* This groups info is needed for when we become_user() for this uid */
-   int n_groups;
+   size_t n_groups;
gid_t *groups;

/* NT group information taken from the info3 structure */

Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2006-01-23 22:32:56 UTC (rev 
13094)
+++ branches/SAMBA_3_0/source/include/smb.h 2006-01-23 23:19:31 UTC (rev 
13095)
@@ -514,7 +514,7 @@
/* following groups stuff added by ih */
 
/* This groups info is valid for the user that *opened* the connection 
*/
-   int ngroups;
+   size_t ngroups;
gid_t *groups;
NT_USER_TOKEN *nt_user_token;


Modified: branches/SAMBA_3_0/source/smbd/service.c
===
--- branches/SAMBA_3_0/source/smbd/service.c2006-01-23 22:32:56 UTC (rev 
13094)
+++ branches/SAMBA_3_0/source/smbd/service.c2006-01-23 23:19:31 UTC (rev 
13095)
@@ -592,6 +592,7 @@
}
 
if (conn->force_user || conn->force_group) {
+   int ngroups = 0;
 
/* groups stuff added by ih */
conn->ngroups = 0;
@@ -600,7 +601,8 @@
/* Find all the groups this uid is in and
   store them. Used by change_to_user() */
initialise_groups(conn->user, conn->uid, conn->gid); 
-   get_current_groups(conn->gid, &conn->ngroups,&conn->groups);
+   get_current_groups(conn->gid, &ngroups, &conn->groups);
+   conn->ngroups = ngroups;

conn->nt_user_token =
create_nt_token(conn->uid, conn->gid,



Build status as of Tue Jan 24 00:00:02 2006

2006-01-23 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-01-23 
00:00:38.0 +
+++ /home/build/master/cache/broken_results.txt 2006-01-24 00:00:06.0 
+
@@ -1,17 +1,17 @@
-Build status as of Mon Jan 23 00:00:02 2006
+Build status as of Tue Jan 24 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
 ccache   8  2  0 
-distcc   9  2  0 
+distcc   9  3  0 
 lorikeet-heimdal 10 10 0 
-ppp  16 0  0 
-rsync32 5  0 
-samba3  0  0 
+ppp  15 0  0 
+rsync31 3  0 
+samba2  0  0 
 samba-docs   0  0  0 
-samba4   34 18 2 
-samba_3_033 6  0 
-smb-build24 4  0 
-talloc   6  4  0 
-tdb  5  1  0 
+samba4   33 16 1 
+samba_3_032 5  0 
+smb-build22 4  0 
+talloc   5  3  0 
+tdb  4  1  0 
 


svn commit: samba r13096 - in branches/SAMBA_4_0: .

2006-01-23 Thread tridge
Author: tridge
Date: 2006-01-24 00:09:41 + (Tue, 24 Jan 2006)
New Revision: 13096

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13096

Log:

explain what YOURDOM and YOUR.REALM are (in case people confuse the
different meanings of the word domain)




Modified:
   branches/SAMBA_4_0/howto.txt


Changeset:
Modified: branches/SAMBA_4_0/howto.txt
===
--- branches/SAMBA_4_0/howto.txt2006-01-23 23:19:31 UTC (rev 13095)
+++ branches/SAMBA_4_0/howto.txt2006-01-24 00:09:41 UTC (rev 13096)
@@ -64,6 +64,9 @@
   # cd source
   # ./setup/provision --realm=YOUR.REALM --domain=YOURDOM 
--adminpass=SOMEPASSWORD
 
+'YOURDOM' is the NT4 style domain name. 'YOUR.REALM' is your kerberos
+realm, which is typically your DNS domain name.
+
 Step 5: Create a simple smb.conf
 
 



svn commit: samba r13097 - in branches/SAMBA_4_0/source: scripting/libjs setup

2006-01-23 Thread tridge
Author: tridge
Date: 2006-01-24 00:11:32 + (Tue, 24 Jan 2006)
New Revision: 13097

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13097

Log:

move the creation of the default sam name -> unix name mappings into
the main provision logic, so it can also be used as part of the
vampire process





Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/setup/provision_users.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-24 
00:09:41 UTC (rev 13096)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-24 
00:11:32 UTC (rev 13097)
@@ -52,25 +52,51 @@
 /*
add a foreign security principle
  */
-function add_foreign(str, sid, desc, unixname)
+function add_foreign(str, sid, desc)
 {
var add = "
 dn: CN=${SID},CN=ForeignSecurityPrincipals,${BASEDN}
 objectClass: top
 objectClass: foreignSecurityPrincipal
 description: ${DESC}
-unixName: ${UNIXNAME}
 uSNCreated: 1
 uSNChanged: 1
 ";
var sub = new Object();
sub.SID = sid;
sub.DESC = desc;
-   sub.UNIXNAME = unixname;
return str + substitute_var(add, sub);
 }
 
+
 /*
+  setup a mapping between a sam name and a unix name
+ */
+function setup_name_mapping(info, ldb, sid, unixname)
+{
+   var attrs = new Array("dn");
+   var res = ldb.search(sprintf("objectSid=%s", sid), 
+NULL, ldb.SCOPE_DEFAULT, attrs);
+   if (res.length != 1) {
+   return false;
+   }
+   var mod = sprintf("
+dn: %s
+changetype: modify
+replace: unixName
+unixName: %s
+",
+ res[0].dn, unixname);
+   var ok = ldb.modify(mod);
+   if (!ok) {
+   info.message("name mapping for %s failed - %s\n",
+sid, ldb.errstring());
+   return false;
+   }
+   return true;
+}
+
+/*
   return current time as a nt time string
 */
 function nttime()
@@ -258,7 +284,43 @@
return paths;
 }
 
+
 /*
+  setup reasonable name mappings for sam names to unix names
+*/
+function setup_name_mappings(info, subobj, session_info, credentials)
+{
+   var lp = loadparm_init();
+   var ldb = ldb_init();
+   ldb.session_info = session_info;
+   ldb.credentials = credentials;
+   var ok = ldb.connect(lp.get("sam database"));
+   if (!ok) {
+   return false;
+   }
+
+   /* some well known sids */
+   setup_name_mapping(info, ldb, "S-1-5-7",  subobj.NOBODY);
+   setup_name_mapping(info, ldb, "S-1-1-0",  subobj.NOGROUP);
+   setup_name_mapping(info, ldb, "S-1-5-2",  subobj.NOGROUP);
+   setup_name_mapping(info, ldb, "S-1-5-18", subobj.ROOT);
+   setup_name_mapping(info, ldb, "S-1-5-11", subobj.USERS);
+   setup_name_mapping(info, ldb, "S-1-5-32-544", subobj.WHEEL);
+   setup_name_mapping(info, ldb, "S-1-5-32-546", subobj.NOGROUP);
+
+   /* and some well known domain rids */
+   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-500", subobj.ROOT);
+   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-518", subobj.WHEEL);
+   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-519", subobj.WHEEL);
+   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-512", subobj.WHEEL);
+   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-513", subobj.USERS);
+   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-520", subobj.WHEEL);
+
+   return true;
+}
+
+
+/*
   provision samba4 - caution, this wipes all existing data!
 */
 function provision(subobj, message, blank, paths, session_info, credentials)
@@ -319,10 +381,17 @@
setup_ldb("provision_templates.ldif", info, paths.samdb, NULL, false);
message("Setting up sam.ldb data\n");
setup_ldb("provision.ldif", info, paths.samdb, NULL, false);
-   if (blank == false) {
-   message("Setting up sam.ldb users and groups\n");
-   setup_ldb("provision_users.ldif", info, paths.samdb, data, 
false);
+   if (blank != false) {
+   return true;
}
+
+   message("Setting up sam.ldb users and groups\n");
+   setup_ldb("provision_users.ldif", info, paths.samdb, data, false);
+
+   if (setup_name_mappings(info, subobj, session_info, credentials) == 
false) {
+   return false;
+   }
+
return true;
 }
 

Modified: branches/SAMBA_4_0/source/setup/provision_users.ldif
===
--- branches/SAMBA_4_0/source/setup/provision_users.ldif2006-01-24 
00:09:41 UTC (rev 13096)
+++ branches/SAMBA_4_0/source/setup/provision_users.ldif2006-01-24 
00:11:32 UTC (rev 13097)
@@ -16,7 +16,6 @@
 sAMAccountName: Administrator
 isCriticalSystemObject: TRUE
 sambaPassword: ${ADMINPASS}
-unixN

svn commit: samba r13098 - in branches/SAMBA_4_0/source/scripting/libjs: .

2006-01-23 Thread tridge
Author: tridge
Date: 2006-01-24 00:16:54 + (Tue, 24 Jan 2006)
New Revision: 13098

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13098

Log:

make check for workgroup and realm case insensitive

Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-24 
00:11:32 UTC (rev 13097)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-24 
00:16:54 UTC (rev 13098)
@@ -608,13 +608,13 @@
}
 
 
-   if (lp.get("workgroup") != subobj.DOMAIN) {
+   if (strupper(lp.get("workgroup")) != strupper(subobj.DOMAIN)) {
message("workgroup '%s' in smb.conf must match chosen domain 
'%s'\n",
lp.get("workgroup"), subobj.DOMAIN);
return false;
}
 
-   if (lp.get("realm") != subobj.REALM) {
+   if (strupper(lp.get("realm")) != strupper(subobj.REALM)) {
message("realm '%s' in smb.conf must match chosen realm '%s'\n",
lp.get("realm"), subobj.REALM);
return false;



svn commit: samba r13099 - in branches/SAMBA_4_0/source/ntvfs/posix: .

2006-01-23 Thread tridge
Author: tridge
Date: 2006-01-24 00:34:58 + (Tue, 24 Jan 2006)
New Revision: 13099

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13099

Log:

allow shares that point to /


Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
===
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c   2006-01-24 00:16:54 UTC 
(rev 13098)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c   2006-01-24 00:34:58 UTC 
(rev 13099)
@@ -124,7 +124,9 @@
/* for simplicity of path construction, remove any trailing slash now */
base_directory = talloc_strdup(pvfs, lp_pathname(tcon->service));
NT_STATUS_HAVE_NO_MEMORY(base_directory);
-   trim_string(base_directory, NULL, "/");
+   if (strcmp(base_directory, "/") != 0) {
+   trim_string(base_directory, NULL, "/");
+   }
 
pvfs->tcon = tcon;
pvfs->base_directory = base_directory;



svn commit: samba r13100 - in branches/SAMBA_4_0/swat: .

2006-01-23 Thread tridge
Author: tridge
Date: 2006-01-24 00:47:58 + (Tue, 24 Jan 2006)
New Revision: 13100

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13100

Log:
removed unused menu item
Modified:
   branches/SAMBA_4_0/swat/menu.js


Changeset:
Modified: branches/SAMBA_4_0/swat/menu.js
===
--- branches/SAMBA_4_0/swat/menu.js 2006-01-24 00:34:58 UTC (rev 13099)
+++ branches/SAMBA_4_0/swat/menu.js 2006-01-24 00:47:58 UTC (rev 13100)
@@ -10,7 +10,6 @@
"Main Menu",
"Servers",session_uri("/?menu=servers"),
"Installation",   session_uri("/install/"),
-   "Configuration",  session_uri("/config/"),
"ESP Tests",  session_uri("/esptest/"));
 
 swat_menus.servers = simple_menu(



svn commit: samba r13101 - in branches/SAMBA_4_0: .

2006-01-23 Thread jelmer
Author: jelmer
Date: 2006-01-24 01:52:42 + (Tue, 24 Jan 2006)
New Revision: 13101

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13101

Log:
autogen.sh doesn't have to be run when compiling from a released tarball 
(running it anyway might give problems for people who don't have autoconf
installed properly or at all)
Fix typo

Modified:
   branches/SAMBA_4_0/howto.txt


Changeset:
Modified: branches/SAMBA_4_0/howto.txt
===
--- branches/SAMBA_4_0/howto.txt2006-01-24 00:47:58 UTC (rev 13100)
+++ branches/SAMBA_4_0/howto.txt2006-01-24 01:52:42 UTC (rev 13101)
@@ -22,6 +22,12 @@
 both methods will create a directory called "samba4" in the current
 directory. If you don't have rsync or svn then install one of them. 
 
+Since only released versions of Samba contain a pregenerated configure script, 
+you will have to generate it by hand:
+
+ $ cd samba4/source
+ $ ./autogen.sh
+
 Note that the above rsync command will give you a checked out svn
 repository. So if you also have svn you can update it to the latest
 version at some future date using:
@@ -35,14 +41,12 @@
 Run this:
 
   $ cd samba4/source
-  $ ./autogen.sh
-  $ ./configure.developer
+  $ ./configure
   $ make proto all
 
-If you have gcc 3.4 or newer, then substitue "pch" for "proto" to
+If you have gcc 3.4 or newer, then substitute "pch" for "proto" to
 greatly speed up the compile process (about 5x faster).
 
-
 Step 3: install Samba4
 --
 



svn commit: samba r13102 - in branches/SAMBA_4_0: source/scripting/libjs swat/install

2006-01-23 Thread tridge
Author: tridge
Date: 2006-01-24 01:52:56 + (Tue, 24 Jan 2006)
New Revision: 13102

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13102

Log:

fixed the vampire code to correctly setup foreign sids and default
unix name mappings

Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/swat/install/vampire.esp


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-24 
01:52:42 UTC (rev 13101)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2006-01-24 
01:52:56 UTC (rev 13102)
@@ -52,20 +52,20 @@
 /*
add a foreign security principle
  */
-function add_foreign(str, sid, desc)
+function add_foreign(ldb, subobj, sid, desc)
 {
-   var add = "
-dn: CN=${SID},CN=ForeignSecurityPrincipals,${BASEDN}
+   var add = sprintf("
+dn: CN=%s,CN=ForeignSecurityPrincipals,%s
 objectClass: top
 objectClass: foreignSecurityPrincipal
-description: ${DESC}
+description: %s
 uSNCreated: 1
 uSNChanged: 1
-";
-   var sub = new Object();
-   sub.SID = sid;
-   sub.DESC = desc;
-   return str + substitute_var(add, sub);
+",
+ sid, subobj.BASEDN, desc);
+   /* deliberately ignore errors from this, as the records may
+  already exist */
+   ldb.add(add);
 }
 
 
@@ -78,6 +78,7 @@
var res = ldb.search(sprintf("objectSid=%s", sid), 
 NULL, ldb.SCOPE_DEFAULT, attrs);
if (res.length != 1) {
+   info.message("Failed to find record for objectSid %s\n", sid);
return false;
}
var mod = sprintf("
@@ -298,7 +299,22 @@
if (!ok) {
return false;
}
+   var attrs = new Array("objectSid");
+   var res = ldb.search("dnsDomain=" + subobj.REALM,
+NULL, ldb.SCOPE_DEFAULT, attrs);
+   if (res.length != 1) {
+   info.message("Failed to find dnsDomain %s\n", subobj.REALM);
+   return false;
+   }
+   var sid = res[0].objectSid;
 
+   /* add some foreign sids if they are not present already */
+   add_foreign(ldb, subobj, "S-1-5-7",  "Anonymous");
+   add_foreign(ldb, subobj, "S-1-1-0",  "World");
+   add_foreign(ldb, subobj, "S-1-5-2",  "Network");
+   add_foreign(ldb, subobj, "S-1-5-18", "System");
+   add_foreign(ldb, subobj, "S-1-5-11", "Authenticated Users");
+
/* some well known sids */
setup_name_mapping(info, ldb, "S-1-5-7",  subobj.NOBODY);
setup_name_mapping(info, ldb, "S-1-1-0",  subobj.NOGROUP);
@@ -307,14 +323,15 @@
setup_name_mapping(info, ldb, "S-1-5-11", subobj.USERS);
setup_name_mapping(info, ldb, "S-1-5-32-544", subobj.WHEEL);
setup_name_mapping(info, ldb, "S-1-5-32-546", subobj.NOGROUP);
+   setup_name_mapping(info, ldb, "S-1-5-32-551", subobj.BACKUP);
 
/* and some well known domain rids */
-   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-500", subobj.ROOT);
-   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-518", subobj.WHEEL);
-   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-519", subobj.WHEEL);
-   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-512", subobj.WHEEL);
-   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-513", subobj.USERS);
-   setup_name_mapping(info, ldb, subobj.DOMAINSID + "-520", subobj.WHEEL);
+   setup_name_mapping(info, ldb, sid + "-500", subobj.ROOT);
+   setup_name_mapping(info, ldb, sid + "-518", subobj.WHEEL);
+   setup_name_mapping(info, ldb, sid + "-519", subobj.WHEEL);
+   setup_name_mapping(info, ldb, sid + "-512", subobj.WHEEL);
+   setup_name_mapping(info, ldb, sid + "-513", subobj.USERS);
+   setup_name_mapping(info, ldb, sid + "-520", subobj.WHEEL);
 
return true;
 }
@@ -342,12 +359,6 @@
var rdns = split(",", subobj.BASEDN);
subobj.RDN_DC = substr(rdns[0], strlen("DC="));
 
-   data = add_foreign(data, "S-1-5-7",  "Anonymous",   
"${NOBODY}");
-   data = add_foreign(data, "S-1-1-0",  "World",   
"${NOGROUP}");
-   data = add_foreign(data, "S-1-5-2",  "Network", 
"${NOGROUP}");
-   data = add_foreign(data, "S-1-5-18", "System",  "${ROOT}");
-   data = add_foreign(data, "S-1-5-11", "Authenticated Users", "${USERS}");
-
provision_next_usn = 1;
 
info.subobj = subobj;
@@ -381,6 +392,7 @@
setup_ldb("provision_templates.ldif", info, paths.samdb, NULL, false);
message("Setting up sam.ldb data\n");
setup_ldb("provision.ldif", info, paths.samdb, NULL, false);
+
if (blank != false) {
return true;
}
@@ -458,6 +470,7 @@
subobj.NOBODY   = findnss(nss.getpwnam, "nobody");
subobj.NOGROUP  = f

svn commit: samba r13103 - in branches/SAMBA_4_0/source/libcli: .

2006-01-23 Thread abartlet
Author: abartlet
Date: 2006-01-24 01:57:31 + (Tue, 24 Jan 2006)
New Revision: 13103

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13103

Log:
Walk the names in the node status request, so I can find a server
name, and use that.

(I was trying to find a machine by the name of __SAMBA__)

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libcli/finddcs.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/finddcs.c
===
--- branches/SAMBA_4_0/source/libcli/finddcs.c  2006-01-24 01:52:56 UTC (rev 
13102)
+++ branches/SAMBA_4_0/source/libcli/finddcs.c  2006-01-24 01:57:31 UTC (rev 
13103)
@@ -209,23 +209,26 @@
 /* We have a node status reply (or perhaps a timeout) */
 static void fallback_node_status_replied(struct nbt_name_request *name_req) 
 {
+   int i;
struct finddcs_state *state = talloc_get_type(name_req->async.private, 
struct finddcs_state);
state->ctx->status = nbt_name_status_recv(name_req, state, 
&state->node_status);
if (!composite_is_ok(state->ctx)) return;
 
-   if (state->node_status.out.status.num_names > 0) {
-   int i;
-   char *name = talloc_strndup(state->dcs, 
state->node_status.out.status.names[0].name, 15);
-   /* Strip space padding */
-   if (name) {
-   i = MIN(strlen(name), 15);
-   for (; i > 0 && name[i - 1] == ' '; i--) {
-   name[i - 1] = '\0';
+   for (i=0; i < state->node_status.out.status.num_names; i++) {
+   int j;
+   if (state->node_status.out.status.names[i].type == 
NBT_NAME_SERVER) {
+   char *name = talloc_strndup(state->dcs, 
state->node_status.out.status.names[0].name, 15);
+   /* Strip space padding */
+   if (name) {
+   j = MIN(strlen(name), 15);
+   for (; j > 0 && name[j - 1] == ' '; j--) {
+   name[j - 1] = '\0';
+   }
}
+   state->dcs[0].name = name;
+   composite_done(state->ctx);
+   return;
}
-   state->dcs[0].name = name;
-   composite_done(state->ctx);
-   return;
}
composite_error(state->ctx, NT_STATUS_NO_LOGON_SERVERS);
 }



svn commit: samba r13104 - in branches/SAMBA_4_0/source/libnet: .

2006-01-23 Thread abartlet
Author: abartlet
Date: 2006-01-24 02:25:50 + (Tue, 24 Jan 2006)
New Revision: 13104

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13104

Log:
Migrate and set secrets keytab values in the 'net join' code.  This
avoids falling back to in-memory keytabs.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_join.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_join.c  2006-01-24 01:57:31 UTC 
(rev 13103)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c  2006-01-24 02:25:50 UTC 
(rev 13104)
@@ -844,6 +844,8 @@
"secret",
"priorSecret",
"priorChanged",
+   "krb5Keytab",
+   "privateKeytab",
NULL
};
uint32_t acct_type = 0;
@@ -1036,6 +1038,12 @@
   "(|" SECRETS_PRIMARY_DOMAIN_FILTER "(realm=%s))",
   r2->out.domain_name, r2->out.realm);
if (ret == 0) {
+   rtn = samdb_msg_set_string(ldb, tmp_mem, msg, "secretsKeytab", 
"secrets.keytab");
+   if (rtn == -1) {
+   r->out.error_string = NULL;
+   talloc_free(tmp_mem);
+   return NT_STATUS_NO_MEMORY;
+   }
} else if (ret == -1) {
r->out.error_string
= talloc_asprintf(mem_ctx, 
@@ -1044,6 +1052,8 @@
talloc_free(tmp_mem);
return NT_STATUS_INTERNAL_DB_CORRUPTION;
} else {
+   const struct ldb_val *private_keytab;
+   const struct ldb_val *krb5_keytab;
const struct ldb_val *prior_secret;
const struct ldb_val *prior_modified_time;
int i;
@@ -1093,6 +1103,26 @@
talloc_free(tmp_mem);
return NT_STATUS_NO_MEMORY;
}
+
+   /* We will want to keep the keytab names */
+   private_keytab = ldb_msg_find_ldb_val(msgs[0], "privateKeytab");
+   if (private_keytab) {
+   rtn = samdb_msg_set_value(ldb, tmp_mem, msg, 
"privateKeytab", private_keytab);
+   if (rtn == -1) {
+   r->out.error_string = NULL;
+   talloc_free(tmp_mem);
+   return NT_STATUS_NO_MEMORY;
+   }
+   }
+   krb5_keytab = ldb_msg_find_ldb_val(msgs[0], "krb5Keytab");
+   if (krb5_keytab) {
+   rtn = samdb_msg_set_value(ldb, tmp_mem, msg, 
"krb5Keytab", krb5_keytab);
+   if (rtn == -1) {
+   r->out.error_string = NULL;
+   talloc_free(tmp_mem);
+   return NT_STATUS_NO_MEMORY;
+   }
+   }
}
 
/* create the secret */



svn commit: samba r13105 - in branches/SAMBA_3_0_RELEASE: examples/VFS examples/auth/crackcheck examples/libsmbclient examples/libsmbclient/smbwrapper examples/misc packaging/Solaris source source/cli

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-24 03:54:33 + (Tue, 24 Jan 2006)
New Revision: 13105

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13105

Log:
pulling some code over for the 3.0.21b releasefirst take at it
Modified:
   branches/SAMBA_3_0_RELEASE/examples/VFS/configure.in
   branches/SAMBA_3_0_RELEASE/examples/auth/crackcheck/crackcheck.c
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/Makefile
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/Makefile
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/smbsh.c
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/smbw.c
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/smbw.h
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/smbw_dir.c
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/wrapper.c
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/smbwrapper/wrapper.h
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/testbrowse.c
   branches/SAMBA_3_0_RELEASE/examples/libsmbclient/teststat.c
   branches/SAMBA_3_0_RELEASE/examples/misc/adssearch.pl
   branches/SAMBA_3_0_RELEASE/packaging/Solaris/makepkg.sh
   branches/SAMBA_3_0_RELEASE/source/VERSION
   branches/SAMBA_3_0_RELEASE/source/client/clitar.c
   branches/SAMBA_3_0_RELEASE/source/client/smbmount.c
   branches/SAMBA_3_0_RELEASE/source/include/includes.h
   branches/SAMBA_3_0_RELEASE/source/include/ntdomain.h
   branches/SAMBA_3_0_RELEASE/source/include/rpc_client.h
   branches/SAMBA_3_0_RELEASE/source/include/rpc_samr.h
   branches/SAMBA_3_0_RELEASE/source/include/rpc_svcctl.h
   branches/SAMBA_3_0_RELEASE/source/include/smb.h
   branches/SAMBA_3_0_RELEASE/source/include/smb_macros.h
   branches/SAMBA_3_0_RELEASE/source/lib/crc32.c
   branches/SAMBA_3_0_RELEASE/source/lib/gencache.c
   branches/SAMBA_3_0_RELEASE/source/lib/substitute.c
   branches/SAMBA_3_0_RELEASE/source/lib/username.c
   branches/SAMBA_3_0_RELEASE/source/lib/util_file.c
   branches/SAMBA_3_0_RELEASE/source/lib/util_sock.c
   branches/SAMBA_3_0_RELEASE/source/libads/ads_ldap.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap.c
   branches/SAMBA_3_0_RELEASE/source/libads/ldap_user.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/clikrb5.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/clispnego.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/nmblib.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/ntlmssp.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/ntlmssp_sign.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/samlogon_cache.c
   branches/SAMBA_3_0_RELEASE/source/libsmb/smbencrypt.c
   branches/SAMBA_3_0_RELEASE/source/modules/vfs_full_audit.c
   branches/SAMBA_3_0_RELEASE/source/nmbd/nmbd.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/wbinfo.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbind_nss_config.h
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbind_nss_solaris.c
   branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_pam.c
   branches/SAMBA_3_0_RELEASE/source/param/loadparm.c
   branches/SAMBA_3_0_RELEASE/source/passdb/passdb.c
   branches/SAMBA_3_0_RELEASE/source/passdb/pdb_sql.c
   branches/SAMBA_3_0_RELEASE/source/passdb/secrets.c
   branches/SAMBA_3_0_RELEASE/source/printing/nt_printing.c
   branches/SAMBA_3_0_RELEASE/source/profile/profile.c
   branches/SAMBA_3_0_RELEASE/source/python/setup.py
   branches/SAMBA_3_0_RELEASE/source/rpc_client/cli_netlogon.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_net.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_prs.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_svcctl.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_eventlog_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_reg_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_spoolss_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_svcctl.c
   branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_svcctl_nt.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_lsarpc.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_samr.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/cmd_srvsvc.c
   branches/SAMBA_3_0_RELEASE/source/rpcclient/rpcclient.c
   branches/SAMBA_3_0_RELEASE/source/sam/idmap.c
   branches/SAMBA_3_0_RELEASE/source/sam/idmap_rid.c
   branches/SAMBA_3_0_RELEASE/source/script/mkversion.sh
   branches/SAMBA_3_0_RELEASE/source/script/tests/functions
   branches/SAMBA_3_0_RELEASE/source/script/tests/runtests.sh
   branches/SAMBA_3_0_RELEASE/source/services/services_db.c
   branches/SAMBA_3_0_RELEASE/source/smbd/nttrans.c
   branches/SAMBA_3_0_RELEASE/source/smbd/oplock.c
   branches/SAMBA_3_0_RELEASE/source/smbd/password.c
   branches/SAMBA_3_0_RELEASE/source/smbd/posix_acls.c
   branches/SAMBA_3_0_RELEASE/source/smbd/trans2.c
   branches/SAMBA_3_0_RELEASE/source/tdb/tdbtool.c
   branches/SAMBA_3_0_RELEASE/source/tdb/tdbutil.c
   branches/SAMBA_3_0_RELEASE

svn commit: samba r13106 - in branches/SAMBA_3_0_RELEASE/packaging: .

2006-01-23 Thread jerry
Author: jerry
Date: 2006-01-24 04:06:29 + (Tue, 24 Jan 2006)
New Revision: 13106

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13106

Log:
syncing up packaging from the 3.0 tree
Added:
   branches/SAMBA_3_0_RELEASE/packaging/RHEL/
   branches/SAMBA_3_0_RELEASE/packaging/RedHat-9/
Removed:
   branches/SAMBA_3_0_RELEASE/packaging/Fedora/
   branches/SAMBA_3_0_RELEASE/packaging/RedHat/


Changeset:
Copied: branches/SAMBA_3_0_RELEASE/packaging/RHEL (from rev 13105, 
branches/SAMBA_3_0/packaging/RHEL)

Copied: branches/SAMBA_3_0_RELEASE/packaging/RedHat-9 (from rev 13105, 
branches/SAMBA_3_0/packaging/RedHat-9)



svn commit: samba r13107 - in branches/SAMBA_4_0/source: auth/credentials auth/kerberos heimdal/lib/hdb heimdal/lib/krb5 heimdal_build kdc setup

2006-01-23 Thread abartlet
Author: abartlet
Date: 2006-01-24 05:31:08 + (Tue, 24 Jan 2006)
New Revision: 13107

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13107

Log:
Follow the lead of Heimdal's kpasswdd and use the HDB (hdb-ldb in our
case) as the keytab.

This avoids issues in replicated setups, as we will replicate the
kpasswd key correctly (including from windows, which is why I care at
the moment).

Andrew Bartlett

Added:
   branches/SAMBA_4_0/source/heimdal/lib/hdb/keytab.c
Modified:
   branches/SAMBA_4_0/source/auth/credentials/credentials_files.c
   branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c
   branches/SAMBA_4_0/source/auth/kerberos/kerberos_util.c
   branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c
   branches/SAMBA_4_0/source/heimdal/lib/hdb/hdb-protos.h
   branches/SAMBA_4_0/source/heimdal/lib/hdb/hdb.c
   branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5.h
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/kdc/config.mk
   branches/SAMBA_4_0/source/kdc/hdb-ldb.c
   branches/SAMBA_4_0/source/kdc/kdc.c
   branches/SAMBA_4_0/source/kdc/kdc.h
   branches/SAMBA_4_0/source/kdc/kpasswdd.c
   branches/SAMBA_4_0/source/setup/secrets.ldif


Changeset:
Sorry, the patch is too large (656 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13107


svn commit: samba-web r895 - in trunk/history: .

2006-01-23 Thread jelmer
Author: jelmer
Date: 2006-01-24 06:22:40 + (Tue, 24 Jan 2006)
New Revision: 895

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=895

Log:
Add release announcements for Samba 4.0.0TP1

Added:
   trunk/history/samba-4.0.0tp1.html


Changeset:
Added: trunk/history/samba-4.0.0tp1.html
===
--- trunk/history/samba-4.0.0tp1.html   2006-01-21 18:17:15 UTC (rev 894)
+++ trunk/history/samba-4.0.0tp1.html   2006-01-24 06:22:40 UTC (rev 895)
@@ -0,0 +1,135 @@
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+http://www.w3.org/1999/xhtml";>
+
+
+Samba - Release Notes Archive
+
+
+
+
+   Samba 4.0.0TP1 Available for Download
+
+
+
+What's new in Samba 4 Technology Preview
+
+
+Samba 4 is the ambitious next version of the Samba suite that is being
+developed in parallel to the stable 3.0 series. The main emphasis in
+this branch is support for the Active Directory logon protocols used
+by Windows 2000 and above.
+
+Samba 4 is currently not yet in a state where it is usable in
+production environments. Note the WARNINGS below, and the STATUS file,
+which aims to document what should and should not work.
+
+With 3 years of development under our belt since Tridge first proposed
+a new Virtual File System (VFS) layer for Samba3 (a project which
+eventually lead to our Active Directory efforts), it was felt that we
+should create something we could 'show off' to our users.  This is a
+Technology Preview (TP), aimed at allowing users, managers and
+developers to see how we have progressed, and to invite feedback and
+support.
+
+WARNINGS
+
+
+Samba4 TP is currently a pre-alpha technology.  It may eat your cat, but
+is far more likely to choose to munch on your password database. We
+recommend against upgrading any production servers from Samba 3 to
+Samba 4 at this stage.  If you are upgrading an experimental server,
+you should backup all configuration and data.
+
+We expect that format changes will require that the user database be
+rebuilt from scratch a number of times before we make a final release,
+losing password data each time.
+
+Samba 4 Technology Preview includes basic Access Control List (ACL)
+protection on the main user database, but due to time constraints,
+none on the registry at this stage.  We also do not currently have
+ACLs on the SWAT web-based management tool. This means that Samba 4
+Technology Preview is not secure.
+
+File system access should occur as the logged in user, much as Samba3
+does.
+
+Again, we strongly recommend against use in a production environment
+at this stage.
+
+NEW FEATURES
+
+
+Samba4 supports the server-side of the Active Directory logon environment
+used by Windows 2000 and later, so we can do full domain join
+and domain logon operations with these clients.
+
+Our Domain Controller (DC) implementation includes our own built-in
+LDAP server and Kerberos Key Distribution Center (KDC) as well as the
+Samba3-like logon services provided over CIFS.  We correctly generate
+the infamous Kerberos PAC, and include it with the Kerberos tickets we
+issue.
+
+SWAT is now integrated into Samba 4 as the user-friendly interface to
+Samba server management. SWAT provides easy provides access to our
+setup and migration tools.  Using SWAT, you can migrate windows
+domains in Samba 4, allowing easy setup of initial user databases, and
+upgrades from Samba 3.
+
+The new VFS features in Samba 4 adapts the filesystem on the server to
+match the Windows client semantics, allowing Samba 4 to better match
+windows behaviour and application expectations.  This includes file
+annotation information (in streams) and NT ACLs in particular.  The
+VFS is backed with an extensive automated test suite.
+
+A new scripting interface has been added to Samba 4, allowing
+JavaScript programs to interface to Samba's internals.
+
+The Samba 4 architecture is based around an LDAP-like database that
+can use a range of modular backends.  One of the backends supports
+standards compliant LDAP servers (including OpenLDAP), and we are
+working on modules to map between AD-like behaviours and this backend.
+We are aiming for Samba 4 to be powerful frontend to large
+directories.
+
+CHANGES
+===
+
+Those familiar with Samba 3 can find a list of user-visible changes
+since that release series in the NEWS file.
+
+KNOWN ISSUES
+
+
+- Standalone server and domain member roles are not currently
+  supported.  While we have much of the infrastructure required, we
+  have not collected these pieces together. 
+
+- There is no printing support in the current release.
+
+- SWAT can be painful with  and forms.  Just use the mouse, as
+  the JavaScript layer doing this will change.
+
+- Domain logons (using Kerberos) from windows clients incorrectly
+  state that the password expires today.
+
+RUNNING Samba4
+==
+
+A short guide to