svn commit: samba r12958 - in branches/SAMBA_4_0/source/nbt_server/dgram: .

2006-01-16 Thread metze
Author: metze
Date: 2006-01-16 14:01:34 + (Mon, 16 Jan 2006)
New Revision: 12958

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12958

Log:
don't bind to '255.255.255.255'

fix bug #3411

metze
Modified:
   branches/SAMBA_4_0/source/nbt_server/dgram/request.c


Changeset:
Modified: branches/SAMBA_4_0/source/nbt_server/dgram/request.c
===
--- branches/SAMBA_4_0/source/nbt_server/dgram/request.c2006-01-16 
05:47:43 UTC (rev 12957)
+++ branches/SAMBA_4_0/source/nbt_server/dgram/request.c2006-01-16 
14:01:34 UTC (rev 12958)
@@ -56,7 +56,7 @@
 */
 NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char 
*bind_address)
 {
-   struct nbt_dgram_socket *bcast_dgmsock;
+   struct nbt_dgram_socket *bcast_dgmsock = NULL;
struct nbtd_server *nbtsrv = iface-nbtsrv;
struct socket_address *bcast_addr, *bind_addr;
NTSTATUS status;
@@ -68,32 +68,32 @@
return NT_STATUS_NO_MEMORY;
}
 
-   /* listen for broadcasts on port 138 */
-   bcast_dgmsock = nbt_dgram_socket_init(iface, nbtsrv-task-event_ctx);
-   if (!bcast_dgmsock) {
-   talloc_free(tmp_ctx);
-   return NT_STATUS_NO_MEMORY;
-   }
+   if (strcmp(0.0.0.0, iface-netmask) != 0) {
+   /* listen for broadcasts on port 138 */
+   bcast_dgmsock = nbt_dgram_socket_init(iface, 
nbtsrv-task-event_ctx);
+   if (!bcast_dgmsock) {
+   talloc_free(tmp_ctx);
+   return NT_STATUS_NO_MEMORY;
+   }

-   bcast_addr = socket_address_from_strings(tmp_ctx, 
bcast_dgmsock-sock-backend_name, 
-iface-bcast_address, 
-lp_dgram_port());
+   bcast_addr = socket_address_from_strings(tmp_ctx, 
bcast_dgmsock-sock-backend_name, 
+iface-bcast_address, 
lp_dgram_port());
+   if (!bcast_addr) {
+   talloc_free(tmp_ctx);
+   return NT_STATUS_NO_MEMORY;
+   }
 
-   status = socket_listen(bcast_dgmsock-sock, bcast_addr, 0, 0);
-   if (!NT_STATUS_IS_OK(status)) {
-   talloc_free(tmp_ctx);
-   DEBUG(0,(Failed to bind to %s:%d - %s\n, 
-iface-bcast_address, lp_dgram_port(), 
nt_errstr(status)));
-   return status;
+   status = socket_listen(bcast_dgmsock-sock, bcast_addr, 0, 0);
+   if (!NT_STATUS_IS_OK(status)) {
+   talloc_free(tmp_ctx);
+   DEBUG(0,(Failed to bind to %s:%d - %s\n, 
+iface-bcast_address, lp_dgram_port(), 
nt_errstr(status)));
+   return status;
+   }
+   
+   dgram_set_incoming_handler(bcast_dgmsock, 
dgram_request_handler, iface);
}
-   talloc_free(bcast_addr);
-   
-   dgram_set_incoming_handler(bcast_dgmsock, dgram_request_handler, iface);
 
-   bind_addr = socket_address_from_strings(tmp_ctx, 
bcast_dgmsock-sock-backend_name, 
-   bind_address, 
-   lp_dgram_port());
-
/* listen for unicasts on port 138 */
iface-dgmsock = nbt_dgram_socket_init(iface, nbtsrv-task-event_ctx);
if (!iface-dgmsock) {
@@ -101,6 +101,13 @@
return NT_STATUS_NO_MEMORY;
}
 
+   bind_addr = socket_address_from_strings(tmp_ctx, 
iface-dgmsock-sock-backend_name, 
+   bind_address, lp_dgram_port());
+   if (!bind_addr) {
+   talloc_free(tmp_ctx);
+   return NT_STATUS_NO_MEMORY;
+   }
+
status = socket_listen(iface-dgmsock-sock, bind_addr, 0, 0);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(tmp_ctx);
@@ -108,23 +115,23 @@
 bind_address, lp_dgram_port(), nt_errstr(status)));
return status;
}
-   talloc_free(bind_addr);
 
dgram_set_incoming_handler(iface-dgmsock, dgram_request_handler, 
iface);
 
talloc_free(tmp_ctx);
 
-
for (i=0;iARRAY_SIZE(mailslot_handlers);i++) {
/* note that we don't need to keep the pointer
   to the dgmslot around - the callback is all
   we need */
struct dgram_mailslot_handler *dgmslot;
 
-   dgmslot = dgram_mailslot_listen(bcast_dgmsock, 
+   if (bcast_dgmsock) {
+   dgmslot = dgram_mailslot_listen(bcast_dgmsock, 

mailslot_handlers[i].mailslot_name,
mailslot_handlers[i].handler, 
iface);
- 

svn commit: samba r12959 - in branches/SAMBA_4_0/source/lib/socket: .

2006-01-16 Thread metze
Author: metze
Date: 2006-01-16 15:23:06 + (Mon, 16 Jan 2006)
New Revision: 12959

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12959

Log:
hopefully fix bug #3365 this time

metze
Modified:
   branches/SAMBA_4_0/source/lib/socket/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/socket/config.m4
===
--- branches/SAMBA_4_0/source/lib/socket/config.m4  2006-01-16 14:01:34 UTC 
(rev 12958)
+++ branches/SAMBA_4_0/source/lib/socket/config.m4  2006-01-16 15:23:06 UTC 
(rev 12959)
@@ -18,14 +18,16 @@
 # it.
 AC_CHECK_FUNCS(connect)
 if test x$ac_cv_func_connect = xno; then
-AC_CHECK_LIB(nsl_s, SOCKET_LIBS, printf)
-AC_CHECK_LIB(nsl, SOCKET_LIBS, printf)
-AC_CHECK_LIB(socket, SOCKET_LIBS, connect)
-AC_CHECK_LIB(inet, SOCKET_LIBS, connect)
+AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, connect)
+AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, connect)
+AC_CHECK_LIB_EXT(socket, SOCKET_LIBS, connect)
+AC_CHECK_LIB_EXT(inet, SOCKET_LIBS, connect)
 SMB_EXT_LIB_ENABLE(SOCKET,YES)
 dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
 dnl has been cached.
-if test x$ac_cv_lib_ext_socket_connect = xyes ||
+if test x$ac_cv_lib_ext_nsl_s_connect = xyes ||
+   test x$ac_cv_lib_ext_nsl_connect = xyes ||
+   test x$ac_cv_lib_ext_socket_connect = xyes ||
test x$ac_cv_lib_ext_inet_connect = xyes; then
 AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
 else



svn commit: samba r12960 - in trunk/source/libsmb: .

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 16:28:14 + (Mon, 16 Jan 2006)
New Revision: 12960

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12960

Log:
One thing that has annoyed me for ages is the fact that you can't run
smbclient against smbd -i anymore, smbclient opens two connections.

This makes cli_dfs_get_referral use the already opened connection.

Jerry, could you please look at this?

Thanks,

Volker

Modified:
   trunk/source/libsmb/clidfs.c


Changeset:
Modified: trunk/source/libsmb/clidfs.c
===
--- trunk/source/libsmb/clidfs.c2006-01-16 15:23:06 UTC (rev 12959)
+++ trunk/source/libsmb/clidfs.c2006-01-16 16:28:14 UTC (rev 12960)
@@ -682,12 +682,15 @@
CLIENT_DFS_REFERRAL *refs = NULL;
size_t num_refs;
uint16 consumed;
-   struct cli_state *cli_ipc;
pstring fullpath;
+   BOOL res;
+   uint16 cnum;

if ( !cli || !sharename )
return False;
 
+   cnum = cli-cnum;
+
/* special case.  never check for a referral on the IPC$ share */
 
if ( strequal( sharename, IPC$ ) )
@@ -699,14 +702,21 @@
 
/* check for the referral */
 
-   if ( !(cli_ipc = cli_cm_open( cli-desthost, IPC$, False )) )
+   if (!cli_send_tconX(cli, IPC$, IPC, NULL, 0)) {
return False;
-   
-   if ( !cli_dfs_get_referral(cli_ipc, fullpath, refs, num_refs, 
consumed) 
-   || !num_refs )
-   {
+   }
+
+   res = cli_dfs_get_referral(cli, fullpath, refs, num_refs, consumed);
+
+   if (!cli_tdis(cli)) {
return False;
}
+
+   cli-cnum = cnum;
+   
+   if (!res || !num_refs ) {
+   return False;
+   }

split_dfs_path( refs[0].dfspath, newserver, newshare );
 



svn commit: samba r12961 - in trunk/source/param: .

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 16:29:08 + (Mon, 16 Jan 2006)
New Revision: 12961

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12961

Log:
Make the per-request loadparm talloc context available to the public. Useable
for short-term stuff.

Volker

Modified:
   trunk/source/param/loadparm.c


Changeset:
Modified: trunk/source/param/loadparm.c
===
--- trunk/source/param/loadparm.c   2006-01-16 16:28:14 UTC (rev 12960)
+++ trunk/source/param/loadparm.c   2006-01-16 16:29:08 UTC (rev 12961)
@@ -1663,6 +1663,19 @@
lp_talloc = NULL;
 }
 
+TALLOC_CTX *tmp_talloc_ctx(void)
+{
+   if (lp_talloc == NULL) {
+   lp_talloc = talloc_init(NULL);
+   }
+
+   if (lp_talloc == NULL) {
+   smb_panic(Could not create temporary talloc context\n);
+   }
+
+   return lp_talloc;
+}
+
 /***
  Convenience routine to grab string parameters into temporary memory
  and run standard_sub_basic on them. The buffers can be written to by



svn commit: samba r12962 - in trunk/source: . nsswitch passdb rpc_server utils

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 16:46:49 + (Mon, 16 Jan 2006)
New Revision: 12962

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12962

Log:
Implement 'net sam', 'net lookup name' and 'net lookup sid'.

net sam is meant to replace net groupmap and pdbedit in the future as a
direct, local access to our passdb. If you extend this, please make sure that
the user interface is *usable*...

To support this better:

The alias member functions how return NTSTATUS instead of bool.

Get better error codes out of ldapsam. We can tell that if an alias member to
be added already existed etc.

Another thing: To speed things up, with ldapsam:trusted=yes feed the
sid2[ug]id caches. In sid2uid, fail if we find a gid and vice versa. This
avoids unnecessary round trips to the LDAP server.

Implement ldapsam_sid_to_id for ldapsam:trusted=yes. One round trip less.

Volker

Added:
   trunk/source/utils/net_sam.c
Modified:
   trunk/source/Makefile.in
   trunk/source/nsswitch/winbindd_passdb.c
   trunk/source/passdb/lookup_sid.c
   trunk/source/passdb/pdb_interface.c
   trunk/source/passdb/pdb_ldap.c
   trunk/source/rpc_server/srv_samr_nt.c
   trunk/source/utils/net.c
   trunk/source/utils/net_groupmap.c
   trunk/source/utils/net_help.c
   trunk/source/utils/net_lookup.c


Changeset:
Sorry, the patch is too large (1007 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12962


svn commit: samba r12963 - in trunk/source/nsswitch: .

2006-01-16 Thread gd
Author: gd
Date: 2006-01-16 17:05:07 + (Mon, 16 Jan 2006)
New Revision: 12963

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12963

Log:
Handle the case when an account may not change it's password in
pam_winbind.

Guenther

Modified:
   trunk/source/nsswitch/pam_winbind.c


Changeset:
Modified: trunk/source/nsswitch/pam_winbind.c
===
--- trunk/source/nsswitch/pam_winbind.c 2006-01-16 16:46:49 UTC (rev 12962)
+++ trunk/source/nsswitch/pam_winbind.c 2006-01-16 17:05:07 UTC (rev 12963)
@@ -130,6 +130,7 @@
{NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT, Invalid Trust 
Account},
{NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT, Invalid Trust Account},
{NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT, Invalid Trust 
Account},
+   {NT_STATUS_ACCESS_DENIED, Access is denied},
{NULL, NULL}
 };
 
@@ -500,6 +501,7 @@
}
 
PAM_WB_REMARK_CHECK_RESPONSE(pamh, response, 
NT_STATUS_BACKUP_CONTROLLER);
+   PAM_WB_REMARK_CHECK_RESPONSE(pamh, response, NT_STATUS_ACCESS_DENIED);
 
/* TODO: tell the min pwd length ? */
PAM_WB_REMARK_CHECK_RESPONSE(pamh, response, NT_STATUS_PWD_TOO_SHORT);



svn commit: samba r12964 - branches/SAMBA_3_0/source/sam trunk/source/sam

2006-01-16 Thread lmuelle
Author: lmuelle
Date: 2006-01-16 17:21:47 + (Mon, 16 Jan 2006)
New Revision: 12964

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12964

Log:
Rewind rem_backend in the case we have to workaround the idmap_ prefix.
Else SAFE_FREE seg faults.  Thanks to G?\195?\188nther for pointing me at this.

I've implemented in in this was as we should announce to remove the
idmap_ strip stuff after some time at all.

Modified:
   branches/SAMBA_3_0/source/sam/idmap.c
   trunk/source/sam/idmap.c


Changeset:
Modified: branches/SAMBA_3_0/source/sam/idmap.c
===
--- branches/SAMBA_3_0/source/sam/idmap.c   2006-01-16 17:05:07 UTC (rev 
12963)
+++ branches/SAMBA_3_0/source/sam/idmap.c   2006-01-16 17:21:47 UTC (rev 
12964)
@@ -120,6 +120,7 @@
char *rem_backend = smb_xstrdup(*remote_backend);
fstring params = ;
char *pparams;
+   BOOL idmap_prefix_workaround = False;

/* get any mode parameters passed in */

@@ -132,6 +133,7 @@
/* strip any leading idmap_ prefix of */
if ( strncmp( rem_backend, idmap_, 6) == 0 ) {
rem_backend += 6;
+   idmap_prefix_workaround = True;
DEBUG(0, (idmap_init: idmap backend uses deprecated 
'idmap_' prefix.  Please replace 'idmap_%s' by '%s' in %s\n, rem_backend, 
rem_backend, dyn_CONFIGFILE));
}

@@ -146,9 +148,13 @@
}
} else {
DEBUG(0, (idmap_init: could not load remote backend 
'%s'\n, rem_backend));
+   if (idmap_prefix_workaround)
+   rem_backend -= 6;
SAFE_FREE(rem_backend);
return False;
}
+   if (idmap_prefix_workaround)
+   rem_backend -= 6;
SAFE_FREE(rem_backend);
}
 

Modified: trunk/source/sam/idmap.c
===
--- trunk/source/sam/idmap.c2006-01-16 17:05:07 UTC (rev 12963)
+++ trunk/source/sam/idmap.c2006-01-16 17:21:47 UTC (rev 12964)
@@ -120,6 +120,7 @@
char *rem_backend = smb_xstrdup(*remote_backend);
fstring params = ;
char *pparams;
+   BOOL idmap_prefix_workaround = False;

/* get any mode parameters passed in */

@@ -132,6 +133,7 @@
/* strip any leading idmap_ prefix of */
if ( strncmp( rem_backend, idmap_, 6) == 0 ) {
rem_backend += 6;
+   idmap_prefix_workaround = True;
DEBUG(0, (idmap_init: idmap backend uses deprecated 
'idmap_' prefix.  Please replace 'idmap_%s' by '%s' in %s\n, rem_backend, 
rem_backend, dyn_CONFIGFILE));
}

@@ -146,9 +148,13 @@
}
} else {
DEBUG(0, (idmap_init: could not load remote backend 
'%s'\n, rem_backend));
+   if (idmap_prefix_workaround)
+   rem_backend -= 6;
SAFE_FREE(rem_backend);
return False;
}
+   if (idmap_prefix_workaround)
+   rem_backend -= 6;
SAFE_FREE(rem_backend);
}
 



svn commit: samba r12965 - in trunk/source: groupdb passdb utils

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 17:42:44 + (Mon, 16 Jan 2006)
New Revision: 12965

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12965

Log:
Implement 'net sam mapunixgroup'. Improve the smbpasswd error message for
certain people in CA (MA?) ... :-)

Jeremy, is that ok now? If yes, please close the bugzilla entry :-)

Volker

Modified:
   trunk/source/groupdb/mapping.c
   trunk/source/passdb/passdb.c
   trunk/source/passdb/pdb_interface.c
   trunk/source/utils/net_groupmap.c
   trunk/source/utils/net_sam.c


Changeset:
Modified: trunk/source/groupdb/mapping.c
===
--- trunk/source/groupdb/mapping.c  2006-01-16 17:21:47 UTC (rev 12964)
+++ trunk/source/groupdb/mapping.c  2006-01-16 17:42:44 UTC (rev 12965)
@@ -176,7 +176,7 @@
fstrcpy(map.nt_name, nt_name);
fstrcpy(map.comment, comment);
 
-   return pdb_add_group_mapping_entry(map);
+   return NT_STATUS_IS_OK(pdb_add_group_mapping_entry(map));
 }
 
 /
@@ -1009,6 +1009,7 @@
BOOL exists;
GROUP_MAP map;
TALLOC_CTX *mem_ctx;
+   NTSTATUS status;
 
DEBUG(10, (Trying to create alias %s\n, name));
 
@@ -1047,10 +1048,12 @@
fstrcpy(map.nt_name, name);
fstrcpy(map.comment, );
 
-   if (!pdb_add_group_mapping_entry(map)) {
-   DEBUG(0, (Could not add group mapping entry for alias %s\n,
- name));
-   return NT_STATUS_ACCESS_DENIED;
+   status = pdb_add_group_mapping_entry(map);
+
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0, (Could not add group mapping entry for alias %s 
+ (%s)\n, name, nt_errstr(status)));
+   return status;
}
 
*rid = new_rid;

Modified: trunk/source/passdb/passdb.c
===
--- trunk/source/passdb/passdb.c2006-01-16 17:21:47 UTC (rev 12964)
+++ trunk/source/passdb/passdb.c2006-01-16 17:42:44 UTC (rev 12965)
@@ -402,8 +402,21 @@
 * be a newly allocated one */
 
if (!pdb_gid_to_sid(pwd-pw_gid, group_sid)) {
-   DEBUG(3, (Primary group %d of new user %s is not mapped. 
- Please add the mapping.\n, pwd-pw_gid, username));
+   struct group *grp;
+
+   grp = getgrgid(pwd-pw_gid);
+   if (grp == NULL) {
+   DEBUG(1, (Primary group %d of user %s does not 
+ exist.\n, pwd-pw_gid, username));
+   result = NT_STATUS_INVALID_PRIMARY_GROUP;
+   goto done;
+   }
+
+   DEBUG(1, (\nPrimary group %s of user %s is not mapped to 
+ a domain group\n
+ Please add a mapping with\n\n
+ net sam mapunixgroup %s\n\n,
+ grp-gr_name, username, grp-gr_name));
result = NT_STATUS_INVALID_PRIMARY_GROUP;
goto done;
}
@@ -955,17 +968,15 @@

if ((local_flags  LOCAL_ADD_USER) || (local_flags  
LOCAL_DELETE_USER)) {
NTSTATUS result;
+   int tmp_debug = DEBUGLEVEL;
 
/* Might not exist in /etc/passwd. */
 
+   DEBUGLEVEL = 1;
result = pdb_init_sam_new(sam_pass, user_name);
+   DEBUGLEVEL = tmp_debug;
if (NT_STATUS_EQUAL(result,
NT_STATUS_INVALID_PRIMARY_GROUP)) {
-   slprintf(err_str, err_str_len-1,
-Primary group of user %s is not 
-mapped, please map it to a SID 
-with\n'net groupmap add'\n,
-user_name);
return False;
}
 

Modified: trunk/source/passdb/pdb_interface.c
===
--- trunk/source/passdb/pdb_interface.c 2006-01-16 17:21:47 UTC (rev 12964)
+++ trunk/source/passdb/pdb_interface.c 2006-01-16 17:42:44 UTC (rev 12965)
@@ -1289,16 +1289,15 @@
   pdb_getgrnam(pdb_context, map, name));
 }
 
-BOOL pdb_add_group_mapping_entry(GROUP_MAP *map)
+NTSTATUS pdb_add_group_mapping_entry(GROUP_MAP *map)
 {
struct pdb_context *pdb_context = pdb_get_static_context(False);
 
if (!pdb_context) {
-   return False;
+   return NT_STATUS_UNSUCCESSFUL;
}
 
-   return NT_STATUS_IS_OK(pdb_context-
-  pdb_add_group_mapping_entry(pdb_context, map));
+   return 

svn commit: samba r12966 - in trunk/source/passdb: .

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 17:45:01 + (Mon, 16 Jan 2006)
New Revision: 12966

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12966

Log:
Only increase debuglevel if necessary, dont decrease
Modified:
   trunk/source/passdb/passdb.c


Changeset:
Modified: trunk/source/passdb/passdb.c
===
--- trunk/source/passdb/passdb.c2006-01-16 17:42:44 UTC (rev 12965)
+++ trunk/source/passdb/passdb.c2006-01-16 17:45:01 UTC (rev 12966)
@@ -972,7 +972,10 @@
 
/* Might not exist in /etc/passwd. */
 
-   DEBUGLEVEL = 1;
+   if (tmp_debug  1) {
+   DEBUGLEVEL = 1;
+   }
+
result = pdb_init_sam_new(sam_pass, user_name);
DEBUGLEVEL = tmp_debug;
if (NT_STATUS_EQUAL(result,



svn commit: samba r12967 - branches/SAMBA_3_0/source/nmbd trunk/source/nmbd

2006-01-16 Thread jerry
Author: jerry
Date: 2006-01-16 18:03:56 + (Mon, 16 Jan 2006)
New Revision: 12967

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12967

Log:
BUG 1061: don't corrupt the file name when reading an lmhosts file (-H) in 
nmbd.  Patch fromAndrew Esh [EMAIL PROTECTED]
Modified:
   branches/SAMBA_3_0/source/nmbd/nmbd.c
   trunk/source/nmbd/nmbd.c


Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd.c
===
--- branches/SAMBA_3_0/source/nmbd/nmbd.c   2006-01-16 17:45:01 UTC (rev 
12966)
+++ branches/SAMBA_3_0/source/nmbd/nmbd.c   2006-01-16 18:03:56 UTC (rev 
12967)
@@ -657,13 +657,14 @@
pstring logfile;
static BOOL opt_interactive;
poptContext pc;
+   static char *p_lmhosts = dyn_LMHOSTSFILE;
struct poptOption long_options[] = {
POPT_AUTOHELP
{daemon, 'D', POPT_ARG_VAL, is_daemon, True, Become a 
daemon(default) },
{interactive, 'i', POPT_ARG_VAL, opt_interactive, True, Run 
interactive (not a daemon) },
{foreground, 'F', POPT_ARG_VAL, Fork, False, Run daemon in 
foreground (for daemontools  etc) },
{log-stdout, 'S', POPT_ARG_VAL, log_stdout, True, Log to stdout },
-   {hosts, 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', Load a netbios 
hosts file},
+   {hosts, 'H', POPT_ARG_STRING, p_lmhosts, 'H', Load a netbios hosts 
file},
{port, 'p', POPT_ARG_INT, global_nmb_port, NMB_PORT, Listen on the 
specified port },
POPT_COMMON_SAMBA
{ NULL }
@@ -803,8 +804,8 @@
}
 
/* Load in any static local names. */ 
-   load_lmhosts_file(dyn_LMHOSTSFILE);
-   DEBUG(3,(Loaded hosts file %s\n, dyn_LMHOSTSFILE));
+   load_lmhosts_file(p_lmhosts);
+   DEBUG(3,(Loaded hosts file %s\n, p_lmhosts));
 
/* If we are acting as a WINS server, initialise data structures. */
if( !initialise_wins() ) {

Modified: trunk/source/nmbd/nmbd.c
===
--- trunk/source/nmbd/nmbd.c2006-01-16 17:45:01 UTC (rev 12966)
+++ trunk/source/nmbd/nmbd.c2006-01-16 18:03:56 UTC (rev 12967)
@@ -657,13 +657,14 @@
pstring logfile;
static BOOL opt_interactive;
poptContext pc;
+   static char *p_lmhosts = dyn_LMHOSTSFILE;
struct poptOption long_options[] = {
POPT_AUTOHELP
{daemon, 'D', POPT_ARG_VAL, is_daemon, True, Become a 
daemon(default) },
{interactive, 'i', POPT_ARG_VAL, opt_interactive, True, Run 
interactive (not a daemon) },
{foreground, 'F', POPT_ARG_VAL, Fork, False, Run daemon in 
foreground (for daemontools  etc) },
{log-stdout, 'S', POPT_ARG_VAL, log_stdout, True, Log to stdout },
-   {hosts, 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', Load a netbios 
hosts file},
+   {hosts, 'H', POPT_ARG_STRING, p_lmhosts, 'H', Load a netbios hosts 
file},
{port, 'p', POPT_ARG_INT, global_nmb_port, NMB_PORT, Listen on the 
specified port },
POPT_COMMON_SAMBA
{ NULL }
@@ -803,8 +804,8 @@
}
 
/* Load in any static local names. */ 
-   load_lmhosts_file(dyn_LMHOSTSFILE);
-   DEBUG(3,(Loaded hosts file %s\n, dyn_LMHOSTSFILE));
+   load_lmhosts_file(p_lmhosts);
+   DEBUG(3,(Loaded hosts file %s\n, p_lmhosts));
 
/* If we are acting as a WINS server, initialise data structures. */
if( !initialise_wins() ) {



Re: svn commit: samba r12960 - in trunk/source/libsmb: .

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

[EMAIL PROTECTED] wrote:
 Author: vlendec
 Date: 2006-01-16 16:28:14 + (Mon, 16 Jan 2006)
 New Revision: 12960
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12960
 
 Log:
 One thing that has annoyed me for ages is the fact that you can't run
 smbclient against smbd -i anymore, smbclient opens two connections.
 
 This makes cli_dfs_get_referral use the already opened connection.
 
 Jerry, could you please look at this?

That's fine.   Better actually.  When the original code was written,
we couldn't multiplex pipe opens over a single cli_state IIRC.
Thanks.   I'll run some tests later today to make sure all my dfs
referrals are still followed correctly.




cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDy+mwIR7qMdg1EfYRAlALAKDUZtWDuHISwkJ3fsh00MzAdX7CygCeO22e
DZdw7G4f7zfKINfMESnggu4=
=9C5q
-END PGP SIGNATURE-


svn commit: samba r12968 - in trunk/source: auth groupdb passdb rpc_server smbd utils

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 21:11:47 + (Mon, 16 Jan 2006)
New Revision: 12968

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12968

Log:
Implement net set, an interface to some fields of the user and the group
comment.

net sam set logonscript vl vl.bat

does what you expect.

The bulk of this patch is due to pdb_update_sam_account and
pdb_update_group_mapping returning NTSTATUS instead of BOOL.

Volker


Modified:
   trunk/source/auth/auth_sam.c
   trunk/source/auth/auth_unix.c
   trunk/source/groupdb/mapping.c
   trunk/source/passdb/passdb.c
   trunk/source/passdb/pdb_interface.c
   trunk/source/rpc_server/srv_lsa_nt.c
   trunk/source/rpc_server/srv_netlog_nt.c
   trunk/source/rpc_server/srv_samr_nt.c
   trunk/source/smbd/chgpasswd.c
   trunk/source/utils/net_groupmap.c
   trunk/source/utils/net_rpc_samsync.c
   trunk/source/utils/net_sam.c
   trunk/source/utils/pdbedit.c


Changeset:
Sorry, the patch is too large (548 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12968


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

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-16 22:41:37 + (Mon, 16 Jan 2006)
New Revision: 12969

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12969

Log:
Implement net set, for account flags and password can and must change fields.

Volker


Modified:
   trunk/source/utils/net_sam.c


Changeset:
Modified: trunk/source/utils/net_sam.c
===
--- trunk/source/utils/net_sam.c2006-01-16 21:11:47 UTC (rev 12968)
+++ trunk/source/utils/net_sam.c2006-01-16 22:41:37 UTC (rev 12969)
@@ -22,6 +22,10 @@
 #include includes.h
 #include utils/net.h
 
+/*
+ * Set a user's data
+ */
+
 static int net_sam_userset(int argc, const char **argv, const char *field,
   BOOL (*fn)(SAM_ACCOUNT *, const char *,
  enum pdb_value_state))
@@ -71,6 +75,8 @@
return -1;
}
 
+   pdb_free_sam(sam_acct);
+
d_printf(Updated %s for %s\\%s to %s\n, field, dom, name, argv[1]);
return 0;
 }
@@ -118,6 +124,181 @@
 }
 
 /*
+ * Set account flags
+ */
+
+static int net_sam_set_userflag(int argc, const char **argv, const char *field,
+   uint16 flag)
+{
+   SAM_ACCOUNT *sam_acct = NULL;
+   DOM_SID sid;
+   enum SID_NAME_USE type;
+   const char *dom, *name;
+   NTSTATUS status;
+   uint16 acct_flags;
+
+   if ((argc != 2) || (!strequal(argv[1], yes) 
+   !strequal(argv[1], no))) {
+   d_printf(usage: net sam set %s user [yes|no]\n, field);
+   return -1;
+   }
+
+   if (!lookup_name(tmp_talloc_ctx(), argv[0], LOOKUP_NAME_ISOLATED,
+dom, name, sid, type)) {
+   d_printf(Could not find name %s\n, argv[0]);
+   return -1;
+   }
+
+   if (type != SID_NAME_USER) {
+   d_printf(%s is a %s, not a user\n, argv[0],
+sid_type_lookup(type));
+   return -1;
+   }
+
+   if (!NT_STATUS_IS_OK(pdb_init_sam(sam_acct))) {
+   d_printf(Internal error\n);
+   return -1;
+   }
+
+   if (!pdb_getsampwsid(sam_acct, sid)) {
+   d_printf(Loading user %s failed\n, argv[0]);
+   return -1;
+   }
+
+   acct_flags = pdb_get_acct_ctrl(sam_acct);
+
+   if (strequal(argv[1], yes)) {
+   acct_flags |= flag;
+   } else {
+   acct_flags = ~flag;
+   }
+
+   pdb_set_acct_ctrl(sam_acct, acct_flags, PDB_CHANGED);
+
+   status = pdb_update_sam_account(sam_acct);
+   if (!NT_STATUS_IS_OK(status)) {
+   d_printf(Updating sam account %s failed with %s\n,
+argv[0], nt_errstr(status));
+   return -1;
+   }
+
+   pdb_free_sam(sam_acct);
+
+   d_printf(Updated flag %s for %s\\%s to %s\n, field, dom, name,
+argv[1]);
+   return 0;
+}
+
+static int net_sam_set_disabled(int argc, const char **argv)
+{
+   return net_sam_set_userflag(argc, argv, disabled, ACB_DISABLED);
+}
+
+static int net_sam_set_pwnotreq(int argc, const char **argv)
+{
+   return net_sam_set_userflag(argc, argv, pwnotreq, ACB_PWNOTREQ);
+}
+
+static int net_sam_set_autolock(int argc, const char **argv)
+{
+   return net_sam_set_userflag(argc, argv, autolock, ACB_AUTOLOCK);
+}
+
+static int net_sam_set_pwnoexp(int argc, const char **argv)
+{
+   return net_sam_set_userflag(argc, argv, pwnoexp, ACB_PWNOEXP);
+}
+
+/*
+ * Set a user's time field
+ */
+
+static int net_sam_set_time(int argc, const char **argv, const char *field,
+   BOOL (*fn)(SAM_ACCOUNT *, time_t,
+  enum pdb_value_state))
+{
+   SAM_ACCOUNT *sam_acct = NULL;
+   DOM_SID sid;
+   enum SID_NAME_USE type;
+   const char *dom, *name;
+   NTSTATUS status;
+   time_t new_time;
+
+   if (argc != 2) {
+   d_printf(usage: net sam set %s user [now|-MM-DD 
HH:MM]\n,
+field);
+   return -1;
+   }
+
+   if (!lookup_name(tmp_talloc_ctx(), argv[0], LOOKUP_NAME_ISOLATED,
+dom, name, sid, type)) {
+   d_printf(Could not find name %s\n, argv[0]);
+   return -1;
+   }
+
+   if (type != SID_NAME_USER) {
+   d_printf(%s is a %s, not a user\n, argv[0],
+sid_type_lookup(type));
+   return -1;
+   }
+
+   if (strequal(argv[1], now)) {
+   new_time = time(NULL);
+   } else {
+   struct tm tm;
+   char *end;
+   ZERO_STRUCT(tm);
+   end = strptime(argv[1], %Y-%m-%d %H:%M, tm);
+   new_time = mktime(tm);
+   if ((end == NULL) || (*end != '\0') || (new_time == -1)) {
+   d_printf(Could not parse time string 

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

2006-01-16 Thread lmuelle
Author: lmuelle
Date: 2006-01-16 23:20:38 + (Mon, 16 Jan 2006)
New Revision: 12970

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12970

Log:
Use d_fprintf(stderr, ...) for any error message.

Modified:
   trunk/source/utils/net_usershare.c


Changeset:
Modified: trunk/source/utils/net_usershare.c
===
--- trunk/source/utils/net_usershare.c  2006-01-16 22:41:37 UTC (rev 12969)
+++ trunk/source/utils/net_usershare.c  2006-01-16 23:20:38 UTC (rev 12970)
@@ -145,7 +145,7 @@
}
 
if (!validate_net_name(sharename, INVALID_SHARENAME_CHARS, 
strlen(sharename))) {
-   d_printf(net usershare add: share name %s contains 
+   d_fprintf(stderr, net usershare add: share name %s contains 
 invalid characters (any of %s)\n,
 sharename, INVALID_SHARENAME_CHARS);
SAFE_FREE(sharename);
@@ -154,7 +154,7 @@
 
/* Disallow shares the same as users. */
if (getpwnam(sharename)) {
-   d_printf(net usershare add: share name %s is already a valid 
system user name\n,
+   d_fprintf(stderr, net usershare add: share name %s is already 
a valid system user name\n,
sharename );
SAFE_FREE(sharename);
return -1;
@@ -169,7 +169,7 @@
 
/* Check the directory to be shared exists. */
if (sys_stat(us_path, sbuf) != 0) {
-   d_printf(net usershare add: cannot stat path %s to ensure 
+   d_fprintf(stderr, net usershare add: cannot stat path %s to 
ensure 
this is a directory. Error was %s\n,
us_path, strerror(errno) );
SAFE_FREE(sharename);
@@ -177,7 +177,7 @@
}
 
if (!S_ISDIR(sbuf.st_mode)) {
-   d_printf(net usershare add: path %s is not a directory.\n,
+   d_fprintf(stderr, net usershare add: path %s is not a 
directory.\n,
us_path );
SAFE_FREE(sharename);
return -1;
@@ -204,7 +204,7 @@
const char *name;
 
if (pcolon == NULL) {
-   d_printf(net usershare add: malformed acl %s (missing 
':').\n,
+   d_fprintf(stderr, net usershare add: malformed acl %s 
(missing ':').\n,
pacl );
talloc_destroy(ctx);
SAFE_FREE(sharename);
@@ -219,7 +219,7 @@
case 'R':
break;
default:
-   d_printf(net usershare add: malformed acl %s 
+   d_fprintf(stderr, net usershare add: malformed 
acl %s 
(access control must be 'r', 'f', or 
'd')\n,
pacl );
talloc_destroy(ctx);
@@ -228,7 +228,7 @@
}
 
if (pcolon[2] != ','  pcolon[2] != '\0') {
-   d_printf(net usershare add: malformed terminating 
character for acl %s\n,
+   d_fprintf(stderr, net usershare add: malformed 
terminating character for acl %s\n,
pacl );
talloc_destroy(ctx);
SAFE_FREE(sharename);
@@ -240,7 +240,7 @@
if (!string_to_sid(sid, name)) {
/* Convert to a SID */
if (!net_lookup_sid_from_name(ctx, name, sid)) {
-   d_printf(net usershare add: cannot convert 
name %s to a SID.\n,
+   d_fprintf(stderr, net usershare add: cannot 
convert name %s to a SID.\n,
name );
talloc_destroy(ctx);
SAFE_FREE(sharename);
@@ -262,7 +262,7 @@
tmpfd = smb_mkstemp(full_path_tmp);
 
if (tmpfd == -1) {
-   d_printf(net usershare add: cannot create tmp file %s\n,
+   d_fprintf(stderr, net usershare add: cannot create tmp file 
%s\n,
full_path_tmp );
talloc_destroy(ctx);
SAFE_FREE(sharename);
@@ -271,7 +271,7 @@
 
/* Ensure we opened the file we thought we did. */
if (sys_lstat(full_path_tmp, lsbuf) != 0) {
-   d_printf(net usershare add: cannot lstat tmp file %s\n,
+   d_fprintf(stderr, net usershare add: cannot lstat tmp file 
%s\n,
full_path_tmp );
talloc_destroy(ctx);
SAFE_FREE(sharename);
@@ -280,7 +280,7 @@
 
/* Check this is the same as the file we opened. */
if (sys_fstat(tmpfd, sbuf) != 0) {
-   d_printf(net usershare add: cannot fstat tmp 

svn commit: samba r12971 - in branches: SAMBA_4_0/source/auth tmp/deryck-samba4-swat/source/auth

2006-01-16 Thread tpot
Author: tpot
Date: 2006-01-16 23:42:07 + (Mon, 16 Jan 2006)
New Revision: 12971

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12971

Log:
Fix spelling.

Modified:
   branches/SAMBA_4_0/source/auth/auth_unix.c
   branches/tmp/deryck-samba4-swat/source/auth/auth_unix.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_unix.c
===
--- branches/SAMBA_4_0/source/auth/auth_unix.c  2006-01-16 23:20:38 UTC (rev 
12970)
+++ branches/SAMBA_4_0/source/auth/auth_unix.c  2006-01-16 23:42:07 UTC (rev 
12971)
@@ -316,7 +316,7 @@
pam_error = pam_authenticate(pamh, PAM_SILENT | lp_null_passwords() ? 0 
: PAM_DISALLOW_NULL_AUTHTOK);
switch( pam_error ){
case PAM_AUTH_ERR:
-   DEBUG(2, (smb_pam_auth: PAM: Athentication Error for 
user %s\n, user));
+   DEBUG(2, (smb_pam_auth: PAM: Authentication Error for 
user %s\n, user));
break;
case PAM_CRED_INSUFFICIENT:
DEBUG(2, (smb_pam_auth: PAM: Insufficient Credentials 
for user %s\n, user));

Modified: branches/tmp/deryck-samba4-swat/source/auth/auth_unix.c
===
--- branches/tmp/deryck-samba4-swat/source/auth/auth_unix.c 2006-01-16 
23:20:38 UTC (rev 12970)
+++ branches/tmp/deryck-samba4-swat/source/auth/auth_unix.c 2006-01-16 
23:42:07 UTC (rev 12971)
@@ -316,7 +316,7 @@
pam_error = pam_authenticate(pamh, PAM_SILENT | lp_null_passwords() ? 0 
: PAM_DISALLOW_NULL_AUTHTOK);
switch( pam_error ){
case PAM_AUTH_ERR:
-   DEBUG(2, (smb_pam_auth: PAM: Athentication Error for 
user %s\n, user));
+   DEBUG(2, (smb_pam_auth: PAM: Authentication Error for 
user %s\n, user));
break;
case PAM_CRED_INSUFFICIENT:
DEBUG(2, (smb_pam_auth: PAM: Insufficient Credentials 
for user %s\n, user));



Build status as of Tue Jan 17 00:00:01 2006

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

--- /home/build/master/cache/broken_results.txt.old 2006-01-16 
00:00:06.0 +
+++ /home/build/master/cache/broken_results.txt 2006-01-17 00:00:34.0 
+
@@ -1,15 +1,15 @@
-Build status as of Mon Jan 16 00:00:02 2006
+Build status as of Tue Jan 17 00:00:01 2006
 
 Build counts:
 Tree Total  Broken Panic 
 ccache   8  2  0 
-distcc   10 3  0 
-lorikeet-heimdal 16 10 0 
+distcc   9  2  0 
+lorikeet-heimdal 27 27 0 
 ppp  15 0  0 
 rsync31 3  0 
 samba2  0  0 
 samba-docs   0  0  0 
-samba4   33 16 2 
+samba4   33 18 2 
 samba_3_032 4  0 
 smb-build23 4  0 
 talloc   9  3  0 


svn commit: samba r12972 - in branches/SAMBA_4_0/source: .

2006-01-16 Thread jpeach
Author: jpeach
Date: 2006-01-17 01:18:27 + (Tue, 17 Jan 2006)
New Revision: 12972

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12972

Log:
Use single quotes in the showflags and showlayout targets to stop the
shell interpreting the expanded make variables.

Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2006-01-16 23:42:07 UTC (rev 12971)
+++ branches/SAMBA_4_0/source/main.mk   2006-01-17 01:18:27 UTC (rev 12972)
@@ -42,28 +42,28 @@
 everything: all
 
 showlayout: 
-   @echo Samba will be installed into:
-   @echo   basedir: $(BASEDIR)
-   @echo   bindir:  $(BINDIR)
-   @echo   sbindir: $(SBINDIR)
-   @echo   libdir:  $(LIBDIR)
-   @echo   modulesdir:  $(MODULESDIR)
-   @echo   includedir:  $(INCLUDEDIR)
-   @echo   vardir:  $(VARDIR)
-   @echo   privatedir:  $(PRIVATEDIR)
-   @echo   piddir:   $(PIDDIR)
-   @echo   lockdir:  $(LOCKDIR)
-   @echo   logfilebase:  $(LOGFILEBASE)
-   @echo   swatdir:  $(SWATDIR)
-   @echo   mandir:   $(MANDIR)
+   @echo 'Samba will be installed into:'
+   @echo '  basedir: $(BASEDIR)'
+   @echo '  bindir:  $(BINDIR)'
+   @echo '  sbindir: $(SBINDIR)'
+   @echo '  libdir:  $(LIBDIR)'
+   @echo '  modulesdir:  $(MODULESDIR)'
+   @echo '  includedir:  $(INCLUDEDIR)'
+   @echo '  vardir:  $(VARDIR)'
+   @echo '  privatedir:  $(PRIVATEDIR)'
+   @echo '  piddir:   $(PIDDIR)'
+   @echo '  lockdir:  $(LOCKDIR)'
+   @echo '  logfilebase:  $(LOGFILEBASE)'
+   @echo '  swatdir:  $(SWATDIR)'
+   @echo '  mandir:   $(MANDIR)'
 
 showflags:
-   @echo Samba will be compiled with flags:
-   @echo   CFLAGS = $(CFLAGS)
-   @echo   LDFLAGS = $(LDFLAGS)
-   @echo   STLD_FLAGS = $(STLD_FLAGS)
-   @echo   SHLD_FLAGS = $(SHLD_FLAGS)
-   @echo   LIBS = $(LIBS)
+   @echo 'Samba will be compiled with flags:'
+   @echo '  CFLAGS = $(CFLAGS)'
+   @echo '  LDFLAGS = $(LDFLAGS)'
+   @echo '  STLD_FLAGS = $(STLD_FLAGS)'
+   @echo '  SHLD_FLAGS = $(SHLD_FLAGS)'
+   @echo '  LIBS = $(LIBS)'
 
 # The permissions to give the executables
 INSTALLPERMS = 0755



svn commit: samba r12973 - in branches/tmp/deryck-samba4-swat/swat: . style

2006-01-16 Thread deryck
Author: deryck
Date: 2006-01-17 03:00:10 + (Tue, 17 Jan 2006)
New Revision: 12973

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12973

Log:
Initial pass at bringing some style to the stripped-down SWAT2.
Basic layout for the page elements is in place now.

deryck

Added:
   branches/tmp/deryck-samba4-swat/swat/style/console.css
Modified:
   branches/tmp/deryck-samba4-swat/swat/header.esp
   branches/tmp/deryck-samba4-swat/swat/index.esp


Changeset:
Modified: branches/tmp/deryck-samba4-swat/swat/header.esp
===
--- branches/tmp/deryck-samba4-swat/swat/header.esp 2006-01-17 01:18:27 UTC 
(rev 12972)
+++ branches/tmp/deryck-samba4-swat/swat/header.esp 2006-01-17 03:00:10 UTC 
(rev 12973)
@@ -6,6 +6,7 @@
   title@@global.page.title/title
 
   link rel=shortcut icon href=/images/favicon.ico /
+  link rel=stylesheet href=/style/console.css type=text/css media=all 
/
 
   meta http-equiv=Content-Type content=text/html; charset=utf-8 /
   meta http-equiv=Content-Language content=en-us /
@@ -14,13 +15,32 @@
 body
 
 div id=header
-  div class=logout
-blogged in as @@session.authinfo.username/b
+  div id=logout
+spanlogged in as @@session.authinfo.username/span
 form method=post action=/logout.esp@@global.SESSIONURI
-input type=submit value=Logout /
+  input type=submit value=Logout /
 /form
   /div
 /div
 
+div id=menu
+  ul
+liServer Status/li
+liUsers/li
+liShares/li
+liOptions/li
+liAdv. Configuration/li
+  /ul
+/div
+
+div id=help
+  h3Hard-coded Server Info/h3
+
+  pFor now, we'll provide hard coded info to get page layout correct./p
+
+  pObviously, we'll go for auto generated info/help since this header
+  will be included on every page./p
+/div
+
 div id=content
 

Modified: branches/tmp/deryck-samba4-swat/swat/index.esp
===
--- branches/tmp/deryck-samba4-swat/swat/index.esp  2006-01-17 01:18:27 UTC 
(rev 12972)
+++ branches/tmp/deryck-samba4-swat/swat/index.esp  2006-01-17 03:00:10 UTC 
(rev 12973)
@@ -1,5 +1,6 @@
 %
-  page_header(Server Status);
+  page_header(Samba Web Administration Tool);
+
   libinclude(base.js);
   libinclude(management.js);
   libinclude(provision.js);
@@ -10,24 +11,10 @@
 
 %
 
-h1Server Status/h1
+h1Samba Web Administration Tool/h1
 
-%
-var servers = new Array(nbt_server, smb_server, ldap_server, 
cldap_server, kdc_server);
-var i;
-var info = new Object();
+h3Options Will Follow Soon/h3
 
-info[NBT Server]  = server_status(nbt);
-info[WINS Server] = server_status(wins);
-info[CLDAP Server]= server_status(cldap);
-info[Kerberos Server] = server_status(kdc);
-info[SMB Server]  = stream_server_status(smb);
-info[LDAP Server] = stream_server_status(ldap);
-info[RPC Server]  = stream_server_status(rpc);
-
-simple_table(info);
-%
-
 %
   page_footer();
 %

Added: branches/tmp/deryck-samba4-swat/swat/style/console.css
===
--- branches/tmp/deryck-samba4-swat/swat/style/console.css  2006-01-17 
01:18:27 UTC (rev 12972)
+++ branches/tmp/deryck-samba4-swat/swat/style/console.css  2006-01-17 
03:00:10 UTC (rev 12973)
@@ -0,0 +1,75 @@
+/*
+   Web-based server management console look and feel
+*/
+
+/* Base elements
+***/
+body {
+   background-color:#EEE;
+   margin:0;
+   padding:0;
+   font-family:sans-serif;
+   color:#000;
+}
+ul {
+   list-style-type:none;
+}
+
+/* Logout and notices
+***/
+#header {
+   width:100%;
+   padding:2px;
+   text-align:right;
+   font-size:small;
+   border-bottom:1px inset #000;
+}
+#header form {
+   display:inline;
+}
+#logout form {
+   margin:0 5px 0 0;
+}
+
+/* Application-wide navigation menu
+***/
+#menu {
+   width:100%;
+   margin:0;
+   line-height:0;
+   border-bottom:1px inset #000;
+}
+#menu ul {
+   padding-left:0;
+   font-size:small;
+}
+#menu li {
+   float:left;
+   margin:0 20px;
+}
+
+/* Left-column help/info menu 
+***/
+/* Probably will double as tree 
+   view for registry-editor-like things */
+#help {
+   background-color:#FFF;
+   float:left;
+   width:20%;
+   height:75%;
+   margin:10px 10px 20px 10px;
+   padding:10px;
+   border:1px solid #CCC;
+}
+
+/* Main content area
+***/
+#content {
+   background-color:#FFF;
+   float:left;
+   width:72%;
+   height:75%;
+   margin:10px 0 20px 0;
+   padding:10px;
+   border:1px solid #CCC;
+}



svn commit: samba r12974 - in branches/tmp/deryck-samba4-swat/swat: . ejs style

2006-01-16 Thread deryck
Author: deryck
Date: 2006-01-17 03:19:23 + (Tue, 17 Jan 2006)
New Revision: 12974

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12974

Log:

Bring login into stylesheet.
Don't link to the favicon, use the default icon position.

deryck

Modified:
   branches/tmp/deryck-samba4-swat/swat/ejs/forms.ejs
   branches/tmp/deryck-samba4-swat/swat/header.esp
   branches/tmp/deryck-samba4-swat/swat/login.esp
   branches/tmp/deryck-samba4-swat/swat/style/console.css


Changeset:
Modified: branches/tmp/deryck-samba4-swat/swat/ejs/forms.ejs
===
--- branches/tmp/deryck-samba4-swat/swat/ejs/forms.ejs  2006-01-17 03:00:10 UTC 
(rev 12973)
+++ branches/tmp/deryck-samba4-swat/swat/ejs/forms.ejs  2006-01-17 03:19:23 UTC 
(rev 12974)
@@ -66,7 +66,7 @@
write(/table\n);
}
for (i in f.submit) {
-   write('input name=submit type=submit value=' + 
f.submit[i] + ' /\n');
+   write('input class=submit name=submit type=submit 
value=' + f.submit[i] + ' /\n');
}
write(/form\n);
 }

Modified: branches/tmp/deryck-samba4-swat/swat/header.esp
===
--- branches/tmp/deryck-samba4-swat/swat/header.esp 2006-01-17 03:00:10 UTC 
(rev 12973)
+++ branches/tmp/deryck-samba4-swat/swat/header.esp 2006-01-17 03:19:23 UTC 
(rev 12974)
@@ -5,7 +5,6 @@
 head
   title@@global.page.title/title
 
-  link rel=shortcut icon href=/images/favicon.ico /
   link rel=stylesheet href=/style/console.css type=text/css media=all 
/
 
   meta http-equiv=Content-Type content=text/html; charset=utf-8 /

Modified: branches/tmp/deryck-samba4-swat/swat/login.esp
===
--- branches/tmp/deryck-samba4-swat/swat/login.esp  2006-01-17 03:00:10 UTC 
(rev 12973)
+++ branches/tmp/deryck-samba4-swat/swat/login.esp  2006-01-17 03:19:23 UTC 
(rev 12974)
@@ -5,7 +5,7 @@
 head
   titleLogin/title
 
-  link rel=shortcut icon href=/images/favicon.ico /
+  link rel=stylesheet href=/style/console.css type=text/css media=all 
/
 
   meta http-equiv=Content-Type content=text/html; charset=utf-8 /
   meta http-equiv=Content-Language content=en-us /
@@ -13,11 +13,7 @@
 
 body
 
-div id=header
-/div
-
-div id=content
-
+div id=login
 %
   libinclude(auth.js);
   include(/ejs/forms.ejs);
@@ -76,8 +72,7 @@
}
}
 %
+/div !-- Close #login --
 
-/div !-- Close #content --
-
 /body
 /html

Modified: branches/tmp/deryck-samba4-swat/swat/style/console.css
===
--- branches/tmp/deryck-samba4-swat/swat/style/console.css  2006-01-17 
03:00:10 UTC (rev 12973)
+++ branches/tmp/deryck-samba4-swat/swat/style/console.css  2006-01-17 
03:19:23 UTC (rev 12974)
@@ -73,3 +73,17 @@
padding:10px;
border:1px solid #CCC;
 }
+
+/* Login page
+***/
+#login {
+   background-color:#FFF;
+   width:300px;
+   margin:10% auto;
+   padding:30px;
+   border:1px solid #CCC;
+}
+#login .submit {
+   float:right;
+   margin:-25px 0 0 0;
+}



svn commit: samba r12975 - in branches/tmp/deryck-samba4-swat/swat: images style

2006-01-16 Thread deryck
Author: deryck
Date: 2006-01-17 03:36:11 + (Tue, 17 Jan 2006)
New Revision: 12975

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12975

Log:
Add bevel/fade to submit buttons.  Very metallic, but
it adds a nice subtle flavor.

deryck

Added:
   branches/tmp/deryck-samba4-swat/swat/images/button_fade.png
Modified:
   branches/tmp/deryck-samba4-swat/swat/style/console.css


Changeset:
Added: branches/tmp/deryck-samba4-swat/swat/images/button_fade.png
===
(Binary files differ)


Property changes on: branches/tmp/deryck-samba4-swat/swat/images/button_fade.png
___
Name: svn:mime-type
   + application/octet-stream

Modified: branches/tmp/deryck-samba4-swat/swat/style/console.css
===
--- branches/tmp/deryck-samba4-swat/swat/style/console.css  2006-01-17 
03:19:23 UTC (rev 12974)
+++ branches/tmp/deryck-samba4-swat/swat/style/console.css  2006-01-17 
03:36:11 UTC (rev 12975)
@@ -27,7 +27,8 @@
 #header form {
display:inline;
 }
-#logout form {
+#logout input {
+   background:url(/images/button_fade.png) top left repeat;
margin:0 5px 0 0;
 }
 
@@ -84,6 +85,7 @@
border:1px solid #CCC;
 }
 #login .submit {
+   background:url(/images/button_fade.png) top left repeat;
float:right;
margin:-25px 0 0 0;
 }



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

2006-01-16 Thread abartlet
Author: abartlet
Date: 2006-01-17 03:44:37 + (Tue, 17 Jan 2006)
New Revision: 12976

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12976

Log:
Patch from Brad Henry [EMAIL PROTECTED]:

This patch pulls the AD site name generation and site join code from 
libnet/libnet_join.c and puts it into a new file, libnet/libnet_site.c. 
This way, a common means for site name, configuration dn and server dn 
generation exists so it doesn't need to be rewritten in new code (such 
as the future libnet_leave for example).

I've made a couple of changes, but nothing dramatic.  Nice work Brad!

Andrew Bartlett


Added:
   branches/SAMBA_4_0/source/libnet/libnet_site.c
Modified:
   branches/SAMBA_4_0/source/libnet/config.mk
   branches/SAMBA_4_0/source/libnet/libnet.h
   branches/SAMBA_4_0/source/libnet/libnet_join.c


Changeset:
Sorry, the patch is too large (488 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12976


Re: svn commit: samba r12977 - in branches/SAMBA_4_0/source: lib/ldb/include lib/ldb/tools libcli/ldap

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

[EMAIL PROTECTED] schrieb:
 Author: idra
 Date: 2006-01-17 04:04:57 + (Tue, 17 Jan 2006)
 New Revision: 12977
 
 WebSVN: 
 http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12977
 
 Log:
 
 Some code to implement the client side of the Dirsync control
 Still investigating how it works.

look at librpc/idl/drsblobs.idl ldapControlDirSyncBlob

you can test with:
bin/ndrdump drsblobs decode_ldapControlDirSync in blob.dat

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

iD8DBQFDzIc2m70gjA5TCD8RAgVyAJ0b+AHGatLsJPg7Z6Sw4J7PXiqkTwCgwlGi
Sn1vXpte2JRFORF5amGOMWM=
=F/h3
-END PGP SIGNATURE-


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

2006-01-16 Thread vlendec
Author: vlendec
Date: 2006-01-17 07:41:53 + (Tue, 17 Jan 2006)
New Revision: 12978

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12978

Log:
d_printf - d_fprintf(stderr)
Modified:
   trunk/source/utils/net_sam.c


Changeset:
Sorry, the patch is too large (459 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12978