svn commit: samba r7137 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: tpot Date: 2005-05-31 11:45:05 + (Tue, 31 May 2005) New Revision: 7137 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7137 Log: Add a couple more dummy idl files for the DNS server and Windows Terminal Server remote management. Added: branches/SAMBA_4_0/source/librpc/idl/dnsserver.idl branches/SAMBA_4_0/source/librpc/idl/winstation.idl Changeset: Added: branches/SAMBA_4_0/source/librpc/idl/dnsserver.idl === --- branches/SAMBA_4_0/source/librpc/idl/dnsserver.idl 2005-05-31 04:40:10 UTC (rev 7136) +++ branches/SAMBA_4_0/source/librpc/idl/dnsserver.idl 2005-05-31 11:45:05 UTC (rev 7137) @@ -0,0 +1,15 @@ +/* + dnsserver interface definition +*/ + +#include idl_types.h + +[ uuid(50abc2a4-574d-40b3-9d66-ee4fd5fba076), + version(5.0), + pointer_default(unique), + pointer_default_top(unique), + helpstring(DNS Server) +] interface dnsserver +{ + void foo(); +} Added: branches/SAMBA_4_0/source/librpc/idl/winstation.idl === --- branches/SAMBA_4_0/source/librpc/idl/winstation.idl 2005-05-31 04:40:10 UTC (rev 7136) +++ branches/SAMBA_4_0/source/librpc/idl/winstation.idl 2005-05-31 11:45:05 UTC (rev 7137) @@ -0,0 +1,15 @@ +/* + dnsserver interface definition +*/ + +#include idl_types.h + +[ uuid(5ca4a760-ebb1-11cf-8611-00a0245420ed), + version(1.0), + pointer_default(unique), + pointer_default_top(unique), + helpstring(Terminal Services remote management) +] interface dnsserver +{ + void foo(); +}
svn commit: samba r7138 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: tpot Date: 2005-05-31 11:46:54 + (Tue, 31 May 2005) New Revision: 7138 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7138 Log: Doh - fix some typos. Modified: branches/SAMBA_4_0/source/librpc/idl/winstation.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/winstation.idl === --- branches/SAMBA_4_0/source/librpc/idl/winstation.idl 2005-05-31 11:45:05 UTC (rev 7137) +++ branches/SAMBA_4_0/source/librpc/idl/winstation.idl 2005-05-31 11:46:54 UTC (rev 7138) @@ -1,5 +1,5 @@ /* - dnsserver interface definition + winstation interface definition */ #include idl_types.h @@ -9,7 +9,7 @@ pointer_default(unique), pointer_default_top(unique), helpstring(Terminal Services remote management) -] interface dnsserver +] interface winstation { void foo(); }
svn commit: samba r7139 - in branches/SAMBA_3_0/source: . client include intl lib libads libsmb modules nsswitch passdb rpc_parse rpc_server smbd tdb utils
Author: jerry Date: 2005-05-31 13:46:45 + (Tue, 31 May 2005) New Revision: 7139 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7139 Log: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 Added: branches/SAMBA_3_0/source/lib/smbldap_util.c Modified: branches/SAMBA_3_0/source/Makefile.in branches/SAMBA_3_0/source/VERSION branches/SAMBA_3_0/source/client/smbspool.c branches/SAMBA_3_0/source/configure.in branches/SAMBA_3_0/source/include/rpc_lsa.h branches/SAMBA_3_0/source/include/rpc_misc.h branches/SAMBA_3_0/source/include/rpc_netlogon.h branches/SAMBA_3_0/source/include/smb_macros.h branches/SAMBA_3_0/source/intl/lang_tdb.c branches/SAMBA_3_0/source/lib/access.c branches/SAMBA_3_0/source/lib/iconv.c branches/SAMBA_3_0/source/lib/smbldap.c branches/SAMBA_3_0/source/lib/time.c branches/SAMBA_3_0/source/lib/util_str.c branches/SAMBA_3_0/source/lib/util_unistr.c branches/SAMBA_3_0/source/lib/util_uuid.c branches/SAMBA_3_0/source/libads/ldap_printer.c branches/SAMBA_3_0/source/libads/sasl.c branches/SAMBA_3_0/source/libsmb/clispnego.c branches/SAMBA_3_0/source/libsmb/spnego.c branches/SAMBA_3_0/source/modules/getdate.c branches/SAMBA_3_0/source/modules/getdate.y branches/SAMBA_3_0/source/modules/weird.c branches/SAMBA_3_0/source/nsswitch/winbindd_nss.h branches/SAMBA_3_0/source/passdb/secrets.c branches/SAMBA_3_0/source/rpc_parse/parse_lsa.c branches/SAMBA_3_0/source/rpc_server/srv_lsa.c branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c branches/SAMBA_3_0/source/smbd/notify_kernel.c branches/SAMBA_3_0/source/smbd/service.c branches/SAMBA_3_0/source/smbd/sesssetup.c branches/SAMBA_3_0/source/tdb/tdb.c branches/SAMBA_3_0/source/tdb/tdbutil.c branches/SAMBA_3_0/source/utils/editreg.c branches/SAMBA_3_0/source/utils/net_ads.c branches/SAMBA_3_0/source/utils/net_groupmap.c Changeset: Sorry, the patch is too large (8294 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7139
svn commit: samba r7140 - in branches/SAMBA_3_0/source: .
Author: jerry Date: 2005-05-31 13:48:37 + (Tue, 31 May 2005) New Revision: 7140 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7140 Log: removing aparser directory since it is obselete in light of pidl Removed: branches/SAMBA_3_0/source/aparser/ Changeset:
svn commit: samba r7142 - in branches/SAMBA_3_0/source: param passdb
Author: jerry Date: 2005-05-31 16:09:58 + (Tue, 31 May 2005) New Revision: 7142 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7142 Log: removing 'ldap filter' smb.conf option Modified: branches/SAMBA_3_0/source/param/loadparm.c branches/SAMBA_3_0/source/passdb/pdb_ldap.c Changeset: Modified: branches/SAMBA_3_0/source/param/loadparm.c === --- branches/SAMBA_3_0/source/param/loadparm.c 2005-05-31 14:02:41 UTC (rev 7141) +++ branches/SAMBA_3_0/source/param/loadparm.c 2005-05-31 16:09:58 UTC (rev 7142) @@ -238,7 +238,6 @@ #endif int ldap_ssl; char *szLdapSuffix; - char *szLdapFilter; char *szLdapAdminDn; char *szAclCompat; char *szCupsServer; @@ -1116,7 +1115,6 @@ #endif {ldap admin dn, P_STRING, P_GLOBAL, Globals.szLdapAdminDn, NULL, NULL, FLAG_ADVANCED}, {ldap delete dn, P_BOOL, P_GLOBAL, Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED}, - {ldap filter, P_STRING, P_GLOBAL, Globals.szLdapFilter, NULL, NULL, FLAG_ADVANCED}, {ldap group suffix, P_STRING, P_GLOBAL, Globals.szLdapGroupSuffix, NULL, NULL, FLAG_ADVANCED}, {ldap idmap suffix, P_STRING, P_GLOBAL, Globals.szLdapIdmapSuffix, NULL, NULL, FLAG_ADVANCED}, {ldap machine suffix, P_STRING, P_GLOBAL, Globals.szLdapMachineSuffix, NULL, NULL, FLAG_ADVANCED}, @@ -1505,7 +1503,6 @@ #endif /* WITH_LDAP_SAMCONFIG */ string_set(Globals.szLdapSuffix, ); - string_set(Globals.szLdapFilter, (uid=%u)); string_set(Globals.szLdapMachineSuffix, ); string_set(Globals.szLdapUserSuffix, ); string_set(Globals.szLdapGroupSuffix, ); @@ -1769,7 +1766,6 @@ FN_GLOBAL_INTEGER(lp_ldap_port, Globals.ldap_port) #endif FN_GLOBAL_STRING(lp_ldap_suffix, Globals.szLdapSuffix) -FN_GLOBAL_STRING(lp_ldap_filter, Globals.szLdapFilter) FN_GLOBAL_STRING(lp_ldap_admin_dn, Globals.szLdapAdminDn) FN_GLOBAL_INTEGER(lp_ldap_ssl, Globals.ldap_ssl) FN_GLOBAL_INTEGER(lp_ldap_passwd_sync, Globals.ldap_passwd_sync) Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c === --- branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2005-05-31 14:02:41 UTC (rev 7141) +++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2005-05-31 16:09:58 UTC (rev 7142) @@ -198,7 +198,7 @@ * in the filter expression, replace %u with the real name * so in ldap filter, %u MUST exist :-) */ - pstr_sprintf(filter, (%s%s), lp_ldap_filter(), + pstr_sprintf(filter, (%s%s), (uid=%u), get_objclass_filter(ldap_state-schema_ver)); /* @@ -1210,7 +1210,7 @@ const char **attr_list; BOOL machine_mask = False, user_mask = False; - pstr_sprintf( filter, (%s%s), lp_ldap_filter(), + pstr_sprintf( filter, (%s%s), (uid=%u), get_objclass_filter(ldap_state-schema_ver)); all_string_sub(filter, %u, *, sizeof(pstring)); @@ -1806,7 +1806,7 @@ we need to return the samba attributes here */ escape_user = escape_ldap_string_alloc( username ); - pstrcpy( filter, lp_ldap_filter() ); + pstrcpy( filter, (uid=%u) ); all_string_sub( filter, %u, escape_user, sizeof(filter) ); SAFE_FREE( escape_user ); @@ -3328,7 +3328,7 @@ char *result = NULL; asprintf(filter, (%s(objectclass=sambaSamAccount)), -lp_ldap_filter()); +(uid=%u)); if (filter == NULL) goto done; escaped = escape_ldap_string_alloc(username);
svn commit: samba r7143 - in branches/SAMBA_3_0/source/utils: .
Author: jerry Date: 2005-05-31 16:10:22 + (Tue, 31 May 2005) New Revision: 7143 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7143 Log: removing unused file Removed: branches/SAMBA_3_0/source/utils/editreg.c Changeset: Deleted: branches/SAMBA_3_0/source/utils/editreg.c ===
svn commit: samba r7144 - in trunk/source: param passdb
Author: jerry Date: 2005-05-31 16:11:46 + (Tue, 31 May 2005) New Revision: 7144 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7144 Log: removing 'ldap filter' smb.conf option Modified: trunk/source/param/loadparm.c trunk/source/passdb/pdb_ldap.c Changeset: Modified: trunk/source/param/loadparm.c === --- trunk/source/param/loadparm.c 2005-05-31 16:10:22 UTC (rev 7143) +++ trunk/source/param/loadparm.c 2005-05-31 16:11:46 UTC (rev 7144) @@ -243,7 +243,6 @@ #endif int ldap_ssl; char *szLdapSuffix; - char *szLdapFilter; char *szLdapAdminDn; char *szAclCompat; char *szCupsServer; @@ -1124,7 +1123,6 @@ #endif {ldap admin dn, P_STRING, P_GLOBAL, Globals.szLdapAdminDn, NULL, NULL, FLAG_ADVANCED}, {ldap delete dn, P_BOOL, P_GLOBAL, Globals.ldap_delete_dn, NULL, NULL, FLAG_ADVANCED}, - {ldap filter, P_STRING, P_GLOBAL, Globals.szLdapFilter, NULL, NULL, FLAG_ADVANCED}, {ldap group suffix, P_STRING, P_GLOBAL, Globals.szLdapGroupSuffix, NULL, NULL, FLAG_ADVANCED}, {ldap idmap suffix, P_STRING, P_GLOBAL, Globals.szLdapIdmapSuffix, NULL, NULL, FLAG_ADVANCED}, {ldap machine suffix, P_STRING, P_GLOBAL, Globals.szLdapMachineSuffix, NULL, NULL, FLAG_ADVANCED}, @@ -1520,7 +1518,6 @@ Globals.szPassdbBackend = str_list_make(smbpasswd, NULL); #endif /* WITH_LDAP_SAMCONFIG */ string_set(Globals.szLdapSuffix, ); - string_set(Globals.szLdapFilter, (uid=%u)); string_set(Globals.szLdapMachineSuffix, ); string_set(Globals.szLdapUserSuffix, ); string_set(Globals.szLdapGroupSuffix, ); @@ -1791,7 +1788,6 @@ FN_GLOBAL_INTEGER(lp_ldap_port, Globals.ldap_port) #endif FN_GLOBAL_STRING(lp_ldap_suffix, Globals.szLdapSuffix) -FN_GLOBAL_STRING(lp_ldap_filter, Globals.szLdapFilter) FN_GLOBAL_STRING(lp_ldap_admin_dn, Globals.szLdapAdminDn) FN_GLOBAL_INTEGER(lp_ldap_ssl, Globals.ldap_ssl) FN_GLOBAL_INTEGER(lp_ldap_passwd_sync, Globals.ldap_passwd_sync) Modified: trunk/source/passdb/pdb_ldap.c === --- trunk/source/passdb/pdb_ldap.c 2005-05-31 16:10:22 UTC (rev 7143) +++ trunk/source/passdb/pdb_ldap.c 2005-05-31 16:11:46 UTC (rev 7144) @@ -338,7 +338,7 @@ * in the filter expression, replace %u with the real name * so in ldap filter, %u MUST exist :-) */ - pstr_sprintf(filter, (%s%s), lp_ldap_filter(), + pstr_sprintf(filter, (%s%s), (uid=%u), get_objclass_filter(ldap_state-schema_ver)); /* @@ -1352,7 +1352,7 @@ const char **attr_list; BOOL machine_mask = False, user_mask = False; - pstr_sprintf( filter, (%s%s), lp_ldap_filter(), + pstr_sprintf( filter, (%s%s), (uid=%u), get_objclass_filter(ldap_state-schema_ver)); all_string_sub(filter, %u, *, sizeof(pstring)); @@ -1948,7 +1948,7 @@ we need to return the samba attributes here */ escape_user = escape_ldap_string_alloc( username ); - pstrcpy( filter, lp_ldap_filter() ); + pstrcpy( filter, (uid=%u) ); all_string_sub( filter, %u, escape_user, sizeof(filter) ); SAFE_FREE( escape_user ); @@ -3716,7 +3716,7 @@ char *result = NULL; asprintf(filter, (%s(objectclass=sambaSamAccount)), -lp_ldap_filter()); +(uid=%u)); if (filter == NULL) goto done; escaped = escape_ldap_string_alloc(username);
svn commit: samba-docs r605 - in trunk/smbdotconf/ldap: .
Author: jerry Date: 2005-05-31 16:13:14 + (Tue, 31 May 2005) New Revision: 605 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=605 Log: removing 'ldap filter' smb.conf option Removed: trunk/smbdotconf/ldap/ldapfilter.xml Changeset: Deleted: trunk/smbdotconf/ldap/ldapfilter.xml === --- trunk/smbdotconf/ldap/ldapfilter.xml2005-05-30 23:26:24 UTC (rev 604) +++ trunk/smbdotconf/ldap/ldapfilter.xml2005-05-31 16:13:14 UTC (rev 605) @@ -1,14 +0,0 @@ -samba:parameter name=ldap filter - context=G -type=string - advanced=1 developer=1 - xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; -description - paraThis parameter specifies the RFC 2254 compliant LDAP search filter. - The default is to match the login name with the constantuid/constant - attribute. Note that this filter should only return one entry. -/para -/description -value type=default(uid=%u)/value -value type=example(amp;(uid=%u)(objectclass=sambaSamAccount))/value -/samba:parameter
svn commit: samba r7145 - in branches/SAMBA_3_0/source/nsswitch: .
Author: gd Date: 2005-05-31 16:21:06 + (Tue, 31 May 2005) New Revision: 7145 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7145 Log: reuse the WINBIND_REQUIRED_MEMBERSHIP constant. This is just cosmetic but prevents people from thinking that the pam_winbind require_membership_of-option is not yet implemented :) Guenther Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.c === --- branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2005-05-31 16:11:46 UTC (rev 7144) +++ branches/SAMBA_3_0/source/nsswitch/pam_winbind.c2005-05-31 16:21:06 UTC (rev 7145) @@ -487,22 +487,24 @@ #endif } - /* Retrieve membership-string here */ - for ( i=0; iargc; i++ ) { + if (ctrl WINBIND_REQUIRED_MEMBERSHIP) { + + for ( i=0; iargc; i++ ) { -if ((strncmp(argv[i], require_membership_of, strlen(require_membership_of)) == 0) -|| (strncmp(argv[i], require-membership-of, strlen(require-membership-of)) == 0)) { +if ((strncmp(argv[i], require_membership_of, strlen(require_membership_of)) == 0) || +(strncmp(argv[i], require-membership-of, strlen(require-membership-of)) == 0)) { -char *p; -char *parm = strdup(argv[i]); + char *p; + char *parm = strdup(argv[i]); -if ( (p = strchr( parm, '=' )) == NULL) { - _pam_log(LOG_INFO, no \=\ delimiter for \require_membership_of\ found\n); - break; + if ( (p = strchr( parm, '=' )) == NULL) { + _pam_log(LOG_INFO, no \=\ delimiter for \require_membership_of\ found\n); + break; + } + + member = strdup(p+1); } - -member = strdup(p+1); -} + } } /* Now use the username to look up password */
svn commit: samba r7146 - in trunk/source/nsswitch: .
Author: gd Date: 2005-05-31 16:22:12 + (Tue, 31 May 2005) New Revision: 7146 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7146 Log: merge from 3_0. Guenther Modified: trunk/source/nsswitch/pam_winbind.c Changeset: Modified: trunk/source/nsswitch/pam_winbind.c === --- trunk/source/nsswitch/pam_winbind.c 2005-05-31 16:21:06 UTC (rev 7145) +++ trunk/source/nsswitch/pam_winbind.c 2005-05-31 16:22:12 UTC (rev 7146) @@ -487,22 +487,24 @@ #endif } - /* Retrieve membership-string here */ - for ( i=0; iargc; i++ ) { + if (ctrl WINBIND_REQUIRED_MEMBERSHIP) { + + for ( i=0; iargc; i++ ) { -if ((strncmp(argv[i], require_membership_of, strlen(require_membership_of)) == 0) -|| (strncmp(argv[i], require-membership-of, strlen(require-membership-of)) == 0)) { +if ((strncmp(argv[i], require_membership_of, strlen(require_membership_of)) == 0) || +(strncmp(argv[i], require-membership-of, strlen(require-membership-of)) == 0)) { -char *p; -char *parm = strdup(argv[i]); + char *p; + char *parm = strdup(argv[i]); -if ( (p = strchr( parm, '=' )) == NULL) { - _pam_log(LOG_INFO, no \=\ delimiter for \require_membership_of\ found\n); - break; + if ( (p = strchr( parm, '=' )) == NULL) { + _pam_log(LOG_INFO, no \=\ delimiter for \require_membership_of\ found\n); + break; + } + + member = strdup(p+1); } - -member = strdup(p+1); -} + } } /* Now use the username to look up password */
svn commit: samba-docs r606 - in trunk/Samba-Guide: .
Author: jht Date: 2005-05-31 17:23:41 + (Tue, 31 May 2005) New Revision: 606 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=606 Log: Fix small typo. Missing space that is essential for syntax. Modified: trunk/Samba-Guide/SBE-TheSmallOffice.xml Changeset: Modified: trunk/Samba-Guide/SBE-TheSmallOffice.xml === --- trunk/Samba-Guide/SBE-TheSmallOffice.xml2005-05-31 16:13:14 UTC (rev 605) +++ trunk/Samba-Guide/SBE-TheSmallOffice.xml2005-05-31 17:23:41 UTC (rev 606) @@ -647,7 +647,7 @@ smbconfoption name=add group script/usr/sbin/groupadd '%g'/smbconfoption smbconfoption name=delete group script/usr/sbin/groupdel '%g'/smbconfoption smbconfoption name=add user to group script/usr/sbin/usermod -G '%g' '%u'/smbconfoption -smbconfoption name=add machine script/smbconfoption +smbconfoption name=add machine script /smbconfoption memberparameter/usr/sbin/useradd -s /bin/false -d /var/lib/nobody '%u'/parameter/member smbconfoption name=logon scriptscripts\login.bat/smbconfoption smbconfoption name=logon path /smbconfoption
svn commit: samba-docs r607 - in trunk/Samba-HOWTO-Collection: .
Author: jht Date: 2005-05-31 17:27:42 + (Tue, 31 May 2005) New Revision: 607 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=607 Log: Fix typo reported by Dave Jeffs [EMAIL PROTECTED] Modified: trunk/Samba-HOWTO-Collection/TOSHARG-VFS.xml trunk/Samba-HOWTO-Collection/index.xml Changeset: Modified: trunk/Samba-HOWTO-Collection/TOSHARG-VFS.xml === --- trunk/Samba-HOWTO-Collection/TOSHARG-VFS.xml2005-05-31 17:23:41 UTC (rev 606) +++ trunk/Samba-HOWTO-Collection/TOSHARG-VFS.xml2005-05-31 17:27:42 UTC (rev 607) @@ -154,7 +154,7 @@ parameterlog file/parameter settings./para paraAn example of detailed per-user and per-machine logging can be obtained by setting - smbconfoption name=log level/var/log/samba/%U.%m.log/smbconfoption. + smbconfoption name=log file/var/log/samba/%U.%m.log/smbconfoption. /para/listitem /itemizedlist Modified: trunk/Samba-HOWTO-Collection/index.xml === --- trunk/Samba-HOWTO-Collection/index.xml 2005-05-31 17:23:41 UTC (rev 606) +++ trunk/Samba-HOWTO-Collection/index.xml 2005-05-31 17:27:42 UTC (rev 607) @@ -152,6 +152,7 @@ !-- Comment out the following line to include the manpages. *Please* do not commit with the line below enabled! -- !--xi:include href=manpages.xml/ -- + xi:include href=manpages.xml/ xi:include href=http://www.gnu.org/licenses/gpl.xml/ xi:include href=TOSHARG-glossary.xml/
svn commit: samba-docs r609 - in trunk/Samba-HOWTO-Collection: .
Author: jht Date: 2005-05-31 17:36:01 + (Tue, 31 May 2005) New Revision: 609 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=609 Log: Removing man pages again. Modified: trunk/Samba-HOWTO-Collection/index.xml Changeset: Modified: trunk/Samba-HOWTO-Collection/index.xml === --- trunk/Samba-HOWTO-Collection/index.xml 2005-05-31 17:34:35 UTC (rev 608) +++ trunk/Samba-HOWTO-Collection/index.xml 2005-05-31 17:36:01 UTC (rev 609) @@ -152,7 +152,6 @@ !-- Comment out the following line to include the manpages. *Please* do not commit with the line below enabled! -- !--xi:include href=manpages.xml/ -- - xi:include href=manpages.xml/ xi:include href=http://www.gnu.org/licenses/gpl.xml/ xi:include href=TOSHARG-glossary.xml/
svn commit: samba r7147 - in trunk/source: libads nsswitch
Author: jerry Date: 2005-05-31 18:13:25 + (Tue, 31 May 2005) New Revision: 7147 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7147 Log: merge patch from 3.0 to fix BUG 2329 (disable netbios = yes); have to resinsert the GETDC code when looking up DC's via netbios calls...still working on this part Modified: trunk/source/libads/ldap.c trunk/source/nsswitch/winbindd_cm.c trunk/source/nsswitch/winbindd_util.c Changeset: Sorry, the patch is too large (374 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7147
svn commit: samba r7148 - in branches/SAMBA_3_0/source/nsswitch: .
Author: jmcd Date: 2005-05-31 18:36:38 + (Tue, 31 May 2005) New Revision: 7148 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7148 Log: Fix #2736: winbind race condition with detecting idle clients winbind idle connection closing logic is getting invoked under high loads for clients which may already have commands in the pipe. This race condition causes clients to fail with NSS_STATUS_UNAVAIL sometimes. We now retry several times hoping (still not guaranteed, though) it will work. Modified: branches/SAMBA_3_0/source/nsswitch/wb_common.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/wb_common.c === --- branches/SAMBA_3_0/source/nsswitch/wb_common.c 2005-05-31 18:13:25 UTC (rev 7147) +++ branches/SAMBA_3_0/source/nsswitch/wb_common.c 2005-05-31 18:36:38 UTC (rev 7148) @@ -588,12 +588,18 @@ struct winbindd_request *request, struct winbindd_response *response) { - NSS_STATUS status; + NSS_STATUS status = NSS_STATUS_UNAVAIL; + int count = 0; - status = winbindd_send_request(req_type, request); - if (status != NSS_STATUS_SUCCESS) - return(status); - return winbindd_get_response(response); + while ((status == NSS_STATUS_UNAVAIL) (count 10)) { + status = winbindd_send_request(req_type, request); + if (status != NSS_STATUS_SUCCESS) + return(status); + status = winbindd_get_response(response); + count += 1; + } + + return status; } /* @@ -606,7 +612,7 @@ BOOL winbind_off( void ) { -static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV =1); + static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV =1); return putenv(s) != -1; }
svn commit: samba r7149 - in trunk/source/nsswitch: .
Author: jmcd Date: 2005-05-31 18:36:59 + (Tue, 31 May 2005) New Revision: 7149 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7149 Log: Fix #2736: winbind race condition with detecting idle clients winbind idle connection closing logic is getting invoked under high loads for clients which may already have commands in the pipe. This race condition causes clients to fail with NSS_STATUS_UNAVAIL sometimes. We now retry several times hoping (still not guaranteed, though) it will work. Modified: trunk/source/nsswitch/wb_common.c Changeset: Modified: trunk/source/nsswitch/wb_common.c === --- trunk/source/nsswitch/wb_common.c 2005-05-31 18:36:38 UTC (rev 7148) +++ trunk/source/nsswitch/wb_common.c 2005-05-31 18:36:59 UTC (rev 7149) @@ -588,12 +588,18 @@ struct winbindd_request *request, struct winbindd_response *response) { - NSS_STATUS status; + NSS_STATUS status = NSS_STATUS_UNAVAIL; + int count = 0; - status = winbindd_send_request(req_type, request); - if (status != NSS_STATUS_SUCCESS) - return(status); - return winbindd_get_response(response); + while ((status == NSS_STATUS_UNAVAIL) (count 10)) { + status = winbindd_send_request(req_type, request); + if (status != NSS_STATUS_SUCCESS) + return(status); + status = winbindd_get_response(response); + count += 1; + } + + return status; } /*
svn commit: samba r7150 - in trunk/source/libsmb: .
Author: jra Date: 2005-05-31 19:06:45 + (Tue, 31 May 2005) New Revision: 7150 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7150 Log: Fix for bug #2698. If a unicode to unix charset conversion fails (due to buggy iconv?) we can be left with a filename that doesn't exist on the remote machine. If we then do a findnext with this file the server gets confused and restarts from the beginning of the directory, causing directory listing loops. Fix this by keeping a copy of the raw filename data and length and using this as the argument to findnext. This won't fix the incorrect iconv conversion into the finfo struct but at least it ensures that directory listings always terminate. Tested against NTFS and FAT directories. Jeremy. Modified: trunk/source/libsmb/clilist.c Changeset: Modified: trunk/source/libsmb/clilist.c === --- trunk/source/libsmb/clilist.c 2005-05-31 18:36:59 UTC (rev 7149) +++ trunk/source/libsmb/clilist.c 2005-05-31 19:06:45 UTC (rev 7150) @@ -31,16 +31,20 @@ by NT and 2 is used by OS/2 / -static size_t interpret_long_filename(struct cli_state *cli, - int level,char *p,file_info *finfo, uint32 *p_resume_key) +static size_t interpret_long_filename(struct cli_state *cli, int level,char *p,file_info *finfo, + uint32 *p_resume_key, DATA_BLOB *p_last_name_raw, uint32 *p_last_name_raw_len) { file_info finfo2; int len; char *base = p; - if (!finfo) finfo = finfo2; + if (!finfo) { + finfo = finfo2; + } - *p_resume_key = 0; + if (p_resume_key) { + *p_resume_key = 0; + } memcpy(finfo,def_finfo,sizeof(*finfo)); switch (level) { @@ -87,7 +91,9 @@ size_t namelen, slen; p += 4; /* next entry offset */ - *p_resume_key = IVAL(p,0); + if (p_resume_key) { + *p_resume_key = IVAL(p,0); + } p += 4; /* fileindex */ /* these dates appear to arrive in a @@ -134,6 +140,22 @@ clistr_pull(cli, finfo-name, p, sizeof(finfo-name), namelen, 0); + + /* To be robust in the face of unicode conversion failures + we need to copy the raw bytes of the last name seen here. + Namelen doesn't include the terminating unicode null, so + copy it here. */ + + if (p_last_name_raw p_last_name_raw_len) { + if (namelen + 2 p_last_name_raw-length) { + memset(p_last_name_raw-data, '\0', sizeof(p_last_name_raw-length)); + *p_last_name_raw_len = 0; + } else { + memcpy(p_last_name_raw-data, p, namelen); + SSVAL(p_last_name_raw-data, namelen, 0); + *p_last_name_raw_len = namelen + 2; + } + } return (size_t)IVAL(base, 0); } } @@ -174,6 +196,8 @@ pstring param; const char *mnt; uint32 resume_key = 0; + uint32 last_name_raw_len = 0; + DATA_BLOB last_name_raw = data_blob(NULL, 2*sizeof(pstring)); /* NT uses 260, OS/2 uses 2. Both accept 1. */ info_level = (cli-capabilitiesCAP_NT_SMBS)?260:1; @@ -215,8 +239,12 @@ can miss filenames. Use last filename continue instead. JRA */ SSVAL(param,10,(FLAG_TRANS2_FIND_REQUIRE_RESUME|FLAG_TRANS2_FIND_CLOSE_IF_END)); /* resume required + close on end */ p = param+12; - p += clistr_push(cli, param+12, mask, sizeof(param)-12, -STR_TERMINATE); + if (last_name_raw_len (last_name_raw_len (sizeof(param)-12))) { + memcpy(p, last_name_raw.data, last_name_raw_len); + p += last_name_raw_len; + } else { + p += clistr_push(cli, param+12, mask, sizeof(param)-12, STR_TERMINATE); + } } param_len = PTR_DIFF(p, param); @@ -283,7 +311,8 @@ /* Last entry - fixup the last offset length. */ SIVAL(p2,0,PTR_DIFF((rdata +
svn commit: samba r7151 - in branches/SAMBA_3_0/source/libsmb: .
Author: jra Date: 2005-05-31 19:06:52 + (Tue, 31 May 2005) New Revision: 7151 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7151 Log: Fix for bug #2698. If a unicode to unix charset conversion fails (due to buggy iconv?) we can be left with a filename that doesn't exist on the remote machine. If we then do a findnext with this file the server gets confused and restarts from the beginning of the directory, causing directory listing loops. Fix this by keeping a copy of the raw filename data and length and using this as the argument to findnext. This won't fix the incorrect iconv conversion into the finfo struct but at least it ensures that directory listings always terminate. Tested against NTFS and FAT directories. Jeremy. Modified: branches/SAMBA_3_0/source/libsmb/clilist.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/clilist.c === --- branches/SAMBA_3_0/source/libsmb/clilist.c 2005-05-31 19:06:45 UTC (rev 7150) +++ branches/SAMBA_3_0/source/libsmb/clilist.c 2005-05-31 19:06:52 UTC (rev 7151) @@ -31,16 +31,20 @@ by NT and 2 is used by OS/2 / -static size_t interpret_long_filename(struct cli_state *cli, - int level,char *p,file_info *finfo, uint32 *p_resume_key) +static size_t interpret_long_filename(struct cli_state *cli, int level,char *p,file_info *finfo, + uint32 *p_resume_key, DATA_BLOB *p_last_name_raw, uint32 *p_last_name_raw_len) { file_info finfo2; int len; char *base = p; - if (!finfo) finfo = finfo2; + if (!finfo) { + finfo = finfo2; + } - *p_resume_key = 0; + if (p_resume_key) { + *p_resume_key = 0; + } memcpy(finfo,def_finfo,sizeof(*finfo)); switch (level) { @@ -87,7 +91,9 @@ size_t namelen, slen; p += 4; /* next entry offset */ - *p_resume_key = IVAL(p,0); + if (p_resume_key) { + *p_resume_key = IVAL(p,0); + } p += 4; /* fileindex */ /* these dates appear to arrive in a @@ -134,6 +140,22 @@ clistr_pull(cli, finfo-name, p, sizeof(finfo-name), namelen, 0); + + /* To be robust in the face of unicode conversion failures + we need to copy the raw bytes of the last name seen here. + Namelen doesn't include the terminating unicode null, so + copy it here. */ + + if (p_last_name_raw p_last_name_raw_len) { + if (namelen + 2 p_last_name_raw-length) { + memset(p_last_name_raw-data, '\0', sizeof(p_last_name_raw-length)); + *p_last_name_raw_len = 0; + } else { + memcpy(p_last_name_raw-data, p, namelen); + SSVAL(p_last_name_raw-data, namelen, 0); + *p_last_name_raw_len = namelen + 2; + } + } return (size_t)IVAL(base, 0); } } @@ -174,6 +196,8 @@ pstring param; const char *mnt; uint32 resume_key = 0; + uint32 last_name_raw_len = 0; + DATA_BLOB last_name_raw = data_blob(NULL, 2*sizeof(pstring)); /* NT uses 260, OS/2 uses 2. Both accept 1. */ info_level = (cli-capabilitiesCAP_NT_SMBS)?260:1; @@ -215,8 +239,12 @@ can miss filenames. Use last filename continue instead. JRA */ SSVAL(param,10,(FLAG_TRANS2_FIND_REQUIRE_RESUME|FLAG_TRANS2_FIND_CLOSE_IF_END)); /* resume required + close on end */ p = param+12; - p += clistr_push(cli, param+12, mask, sizeof(param)-12, -STR_TERMINATE); + if (last_name_raw_len (last_name_raw_len (sizeof(param)-12))) { + memcpy(p, last_name_raw.data, last_name_raw_len); + p += last_name_raw_len; + } else { + p += clistr_push(cli, param+12, mask, sizeof(param)-12, STR_TERMINATE); + } } param_len = PTR_DIFF(p, param); @@ -283,7 +311,8 @@ /* Last entry - fixup the last offset length. */
svn commit: samba r7152 - in trunk/source/nsswitch: .
Author: jerry Date: 2005-05-31 19:56:28 + (Tue, 31 May 2005) New Revision: 7152 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7152 Log: fix passing duplicate alt_names to add_trusted_domain(); fixes fd_events list corruption I was seeing in security=ads Modified: trunk/source/nsswitch/winbindd_util.c Changeset: Modified: trunk/source/nsswitch/winbindd_util.c === --- trunk/source/nsswitch/winbindd_util.c 2005-05-31 19:06:52 UTC (rev 7151) +++ trunk/source/nsswitch/winbindd_util.c 2005-05-31 19:56:28 UTC (rev 7152) @@ -262,7 +262,14 @@ if (find_domain_from_sid_noinit(sid) == NULL) { struct winbindd_domain *domain; - domain = add_trusted_domain(p, alt_name, + char *alternate_name = NULL; + + /* use the real alt_name if we have one, else pass in NULL */ + + if ( !strequal( alt_name, (null) ) ) + alternate_name = alt_name; + + domain = add_trusted_domain(p, alternate_name, cache_methods, sid); setup_domain_child(domain, domain-child);
svn commit: samba r7153 - in branches/SAMBA_3_0/examples/libsmbclient: .
Author: derrell Date: 2005-05-31 20:12:34 + (Tue, 31 May 2005) New Revision: 7153 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7153 Log: add better test facilities to testutime Modified: branches/SAMBA_3_0/examples/libsmbclient/testutime.c Changeset: Modified: branches/SAMBA_3_0/examples/libsmbclient/testutime.c === --- branches/SAMBA_3_0/examples/libsmbclient/testutime.c2005-05-31 19:56:28 UTC (rev 7152) +++ branches/SAMBA_3_0/examples/libsmbclient/testutime.c2005-05-31 20:12:34 UTC (rev 7153) @@ -10,12 +10,12 @@ { int ret; int debug = 0; -int mode = 0666; charbuffer[16384]; charmtime[32]; charctime[32]; charatime[32]; char * pSmbPath = NULL; +time_t t = time(NULL); struct tm tm; struct stat st; struct utimbuf utimbuf; @@ -31,12 +31,12 @@ else if (argc == 3) { pSmbPath = argv[1]; -mode = (int) strtol(argv[2], NULL, 8); +t = (time_t) strtol(argv[2], NULL, 10); } else { printf(usage: - %s [ smb://path/to/file [ octal_mode ] ]\n, + %s [ smb://path/to/file [ mtime ] ]\n, argv[0]); return 1; } @@ -54,8 +54,8 @@ st.st_ctime, ctime_r(st.st_ctime, ctime), st.st_atime, ctime_r(st.st_atime, atime)); -utimbuf.actime = st.st_atime - 120; /* unchangable (wont change) */ -utimbuf.modtime = st.st_mtime - 120; /* this one should succeed */ +utimbuf.actime = t; /* unchangable (wont change) */ +utimbuf.modtime = t;/* this one should succeed */ if (smbc_utime(pSmbPath, utimbuf) 0) { perror(smbc_utime);
svn commit: samba r7154 - in trunk/source/nsswitch: .
Author: jerry Date: 2005-05-31 20:35:05 + (Tue, 31 May 2005) New Revision: 7154 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7154 Log: we shoudl never add an fd_event struct twice (volker, i'm not sure this safety net is the right way to handle it) Modified: trunk/source/nsswitch/winbindd.c Changeset: Modified: trunk/source/nsswitch/winbindd.c === --- trunk/source/nsswitch/winbindd.c2005-05-31 20:12:34 UTC (rev 7153) +++ trunk/source/nsswitch/winbindd.c2005-05-31 20:35:05 UTC (rev 7154) @@ -350,6 +350,15 @@ void add_fd_event(struct fd_event *ev) { + struct fd_event *match; + + /* only add unique fd_event structs */ + + for (match=fd_events; match; match=match-next ) { + if ( match == ev ) + return; + } + DLIST_ADD(fd_events, ev); }
svn commit: samba r7155 - in trunk/source/nsswitch: .
Author: jerry Date: 2005-05-31 22:02:44 + (Tue, 31 May 2005) New Revision: 7155 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7155 Log: a little bit of paranoia until we gain more confidence in the fd_events list Modified: trunk/source/nsswitch/winbindd.c Changeset: Modified: trunk/source/nsswitch/winbindd.c === --- trunk/source/nsswitch/winbindd.c2005-05-31 20:35:05 UTC (rev 7154) +++ trunk/source/nsswitch/winbindd.c2005-05-31 22:02:44 UTC (rev 7155) @@ -355,8 +355,12 @@ /* only add unique fd_event structs */ for (match=fd_events; match; match=match-next ) { +#ifdef DEVELOPER + SMB_ASSERT( match != ev ); +#else if ( match == ev ) return; +#endif } DLIST_ADD(fd_events, ev);
svn commit: samba r7156 - in branches/SAMBA_3_0/examples/libsmbclient: .
Author: derrell Date: 2005-05-31 23:42:29 + (Tue, 31 May 2005) New Revision: 7156 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7156 Log: file was missing; svn isn't smart enough to even notify me. sigh. Added: branches/SAMBA_3_0/examples/libsmbclient/get_auth_data_fn.h Changeset: Added: branches/SAMBA_3_0/examples/libsmbclient/get_auth_data_fn.h === --- branches/SAMBA_3_0/examples/libsmbclient/get_auth_data_fn.h 2005-05-31 22:02:44 UTC (rev 7155) +++ branches/SAMBA_3_0/examples/libsmbclient/get_auth_data_fn.h 2005-05-31 23:42:29 UTC (rev 7156) @@ -0,0 +1,52 @@ +static void +get_auth_data_fn(const char * pServer, + const char * pShare, + char * pWorkgroup, + int maxLenWorkgroup, + char * pUsername, + int maxLenUsername, + char * pPassword, + int maxLenPassword) + +{ +char temp[128]; + +fprintf(stdout, Workgroup: [%s] , pWorkgroup); +fgets(temp, sizeof(temp), stdin); + +if (temp[strlen(temp) - 1] == '\n') /* A new line? */ +{ +temp[strlen(temp) - 1] = '\0'; +} + +if (temp[0] != '\0') +{ +strncpy(pWorkgroup, temp, maxLenWorkgroup - 1); +} + +fprintf(stdout, Username: [%s] , pUsername); +fgets(temp, sizeof(temp), stdin); + +if (temp[strlen(temp) - 1] == '\n') /* A new line? */ +{ +temp[strlen(temp) - 1] = '\0'; +} + +if (temp[0] != '\0') +{ +strncpy(pUsername, temp, maxLenUsername - 1); +} + +fprintf(stdout, Password: ); +fgets(temp, sizeof(temp), stdin); + +if (temp[strlen(temp) - 1] == '\n') /* A new line? */ +{ +temp[strlen(temp) - 1] = '\0'; +} + +if (temp[0] != '\0') +{ +strncpy(pPassword, temp, maxLenPassword - 1); +} +}
svn commit: samba r7158 - in trunk/source/libsmb: .
Author: jra Date: 2005-06-01 00:00:08 + (Wed, 01 Jun 2005) New Revision: 7158 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7158 Log: Ensure we abort a directory listing if we see the same name twice between packets. Jeremy. Modified: trunk/source/libsmb/clilist.c Changeset: Modified: trunk/source/libsmb/clilist.c === --- trunk/source/libsmb/clilist.c 2005-06-01 00:00:07 UTC (rev 7157) +++ trunk/source/libsmb/clilist.c 2005-06-01 00:00:08 UTC (rev 7158) @@ -313,6 +313,13 @@ } p2 += interpret_long_filename(cli,info_level,p2,finfo, resume_key,last_name_raw,last_name_raw_len); + + if (!First *mask strcsequal(finfo.name, mask)) { + DEBUG(0,(Error: Looping in FIND_NEXT as name %s has already been seen?\n, + finfo.name)); + ff_eos = 1; + break; + } } if (ff_lastname 0) {
svn commit: samba r7157 - in branches/SAMBA_3_0/source/libsmb: .
Author: jra Date: 2005-06-01 00:00:07 + (Wed, 01 Jun 2005) New Revision: 7157 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7157 Log: Ensure we abort a directory listing if we see the same name twice between packets. Jeremy. Modified: branches/SAMBA_3_0/source/libsmb/clilist.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/clilist.c === --- branches/SAMBA_3_0/source/libsmb/clilist.c 2005-05-31 23:42:29 UTC (rev 7156) +++ branches/SAMBA_3_0/source/libsmb/clilist.c 2005-06-01 00:00:07 UTC (rev 7157) @@ -313,6 +313,13 @@ } p2 += interpret_long_filename(cli,info_level,p2,finfo, resume_key,last_name_raw,last_name_raw_len); + + if (!First *mask strcsequal(finfo.name, mask)) { + DEBUG(0,(Error: Looping in FIND_NEXT as name %s has already been seen?\n, + finfo.name)); + ff_eos = 1; + break; + } } if (ff_lastname 0) {
svn commit: samba r7159 - in branches/SAMBA_4_0/source: build/pidl librpc/idl rpc_server/echo torture/rpc
Author: jelmer Date: 2005-06-01 00:00:50 + (Wed, 01 Jun 2005) New Revision: 7159 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7159 Log: Improve the messages from pidl's validator module. Change the IDL file for the echo interface to match the one we use for Windows. The only thing different between the two files currently is the names of the scalar types and the handling of strings. Modified: branches/SAMBA_4_0/source/build/pidl/pidl.1.xml branches/SAMBA_4_0/source/build/pidl/validator.pm branches/SAMBA_4_0/source/librpc/idl/echo.idl branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c branches/SAMBA_4_0/source/torture/rpc/echo.c Changeset: Modified: branches/SAMBA_4_0/source/build/pidl/pidl.1.xml === --- branches/SAMBA_4_0/source/build/pidl/pidl.1.xml 2005-06-01 00:00:08 UTC (rev 7158) +++ branches/SAMBA_4_0/source/build/pidl/pidl.1.xml 2005-06-01 00:00:50 UTC (rev 7159) @@ -19,15 +19,17 @@ arg choice=opt--output OUTNAME/arg arg choice=opt--parse/arg arg choice=opt--dump/arg - arg choice=opt--header/arg - arg choice=opt--parser/arg + arg choice=opt--header[=OUTPUT]/arg + arg choice=opt--parser[=OUTPUT]/arg arg choice=opt--server/arg arg choice=opt--template/arg - arg choice=opt--eth-parser/arg - arg choice=opt--eth-header/arg + arg choice=opt--eth-parser[=OUTPUT]/arg + arg choice=opt--eth-header[=OUTPUT]/arg arg choice=opt--diff/arg arg choice=opt--keep/arg arg choice=reqidlfile/arg + arg choice=optidlfile2/arg + arg choice=opt.../arg /cmdsynopsis /refsynopsisdiv @@ -49,16 +51,17 @@ dissectors that can parse data sent over the wire by these interfaces. /para - parapidl takes IDL files in the same format that is used by midl, + parapidl takes IDL files in the same format as is used by midl, converts it to a .pidl file (which contains pidl's internal representation of the interface) and can then generate whatever output you need. .pidl files should be used for debugging purposes only. Write your - interface definitions in (midl) .idl format. + interface definitions in .idl format. /para para The goal of pidl is to implement a IDL compiler that can be used while developing the RPC subsystem in Samba (for - both marshalling/un-marshalling and debugging purposes)./para + both marshalling/unmarshalling and debugging purposes). + /para /refsect1 @@ -378,12 +381,6 @@ /refsect2 refsect2 - titlePointers/title - - paraPidl does not support full pointers in the DCE meaning of the word. However, its unique pointer is compatible with MIDL's full (ptr) pointer support. /para - /refsect2 - - refsect2 titleDatagram support/title parancadg is not supported yet./para Modified: branches/SAMBA_4_0/source/build/pidl/validator.pm === --- branches/SAMBA_4_0/source/build/pidl/validator.pm 2005-06-01 00:00:08 UTC (rev 7158) +++ branches/SAMBA_4_0/source/build/pidl/validator.pm 2005-06-01 00:00:50 UTC (rev 7159) @@ -149,6 +149,25 @@ } } +sub mapToScalar($) +{ + my $t = shift; + my $ti = typelist::getType($t); + + if (not defined ($ti)) { + return undef; + } elsif ($ti-{DATA}-{TYPE} eq ENUM) { + return typelist::enum_type_fn($ti-{DATA}); + } elsif ($ti-{DATA}-{TYPE} eq BITMAP) { + return typelist::enum_type_fn($ti-{DATA}); + } elsif ($ti-{DATA}-{TYPE} eq SCALAR) { + return $t; + } + + return undef; +} + + # # parse a struct sub ValidElement($) @@ -174,9 +193,20 @@ my $discriminator_type = util::has_property($type, switch_type); $discriminator_type = uint32 unless defined ($discriminator_type); - if ($e2-{TYPE} ne $discriminator_type) { - print el_name($e) . : Warning: switch_is() is of type $e2-{TYPE}, while discriminator type for union $type-{NAME} is $discriminator_type\n; + my $t1 = mapToScalar($discriminator_type); + + if (not defined($t1)) { + fatal($e, el_name($e) . : unable to map discriminator type '$discriminator_type' to scalar); } + + my $t2 =
svn commit: samba r7160 - in branches/SAMBA_4_0/source/build/pidl: .
Author: jelmer Date: 2005-06-01 00:12:34 + (Wed, 01 Jun 2005) New Revision: 7160 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7160 Log: Initial work on an esp function wrapper generator Added: branches/SAMBA_4_0/source/build/pidl/esp.pm Modified: branches/SAMBA_4_0/source/build/pidl/pidl.pl Changeset: Added: branches/SAMBA_4_0/source/build/pidl/esp.pm === --- branches/SAMBA_4_0/source/build/pidl/esp.pm 2005-06-01 00:00:50 UTC (rev 7159) +++ branches/SAMBA_4_0/source/build/pidl/esp.pm 2005-06-01 00:12:34 UTC (rev 7160) @@ -0,0 +1,76 @@ +### +# ESP function wrapper generator +# Copyright [EMAIL PROTECTED] 2005 +# released under the GNU GPL + +package EspClient; + +use strict; +use pidl::typelist; + +my($res); + +sub pidl ($) +{ + $res .= shift; +} + +sub ESPFunction($) +{ + my $d = shift; + + pidl static int esp_$d-{NAME}(struct EspRequest *ep, int argc, struct MprVar **argv)\n; + pidl {\n; + + # FIXME + + pidl \treturn 0;\n; + pidl }\n\n; +} + +# +# parse the interface definitions +sub ESPInterface($) +{ + my($interface) = shift; + my @fns = (); + + foreach my $d (@{$interface-{FUNCTIONS}}) { + next if not defined($d-{OPNUM}); + + ESPFunction($d); + + push (@fns, $d-{NAME}); + } + + return @fns; +} + +# +# parse a parsed IDL into a C header +sub Parse($$) +{ +my($ndr) = shift; + my $hdr = shift; + my @fns = (); + + $res = ; + pidl #include \$hdr\\n\n; +pidl /* ESP wrapper functions auto-generated by pidl */\n\n; +foreach my $x (@{$ndr}) { + if ($x-{TYPE} eq INTERFACE) { + push (@fns, ESPInterface($x)); + } +} + + pidl void setup_ejs_functions(void)\n; + pidl {\n; + foreach (@fns) { + pidl \tespDefineCFunction(NULL, \$_\, esp_$_, NULL);\n; + } + pidl }\n; + +return $res; +} + +1; Modified: branches/SAMBA_4_0/source/build/pidl/pidl.pl === --- branches/SAMBA_4_0/source/build/pidl/pidl.pl2005-06-01 00:00:50 UTC (rev 7159) +++ branches/SAMBA_4_0/source/build/pidl/pidl.pl2005-06-01 00:12:34 UTC (rev 7160) @@ -31,6 +31,7 @@ use pidl::template; use pidl::swig; use pidl::compat; +use pidl::esp; my($opt_help) = 0; my($opt_parse) = 0; @@ -47,6 +48,7 @@ my($opt_swig) = 0; my($opt_dcom_proxy) = 0; my($opt_com_header) = 0; +my($opt_esp); my($opt_odl) = 0; my($opt_quiet) = 0; my($opt_output); @@ -70,6 +72,7 @@ --dumpdump a pidl file back to idl --header[=OUTFILE]create a C NDR header file --parser[=OUTFILE]create a C NDR parser + --esp[=OUTFILE] create esp wrapper file --client create a C NDR client --server create server boilerplate --templateprint a template for a pipe @@ -100,6 +103,7 @@ 'client' = \$opt_client, 'eth-parser:s' = \$opt_eth_parser, 'eth-header:s' = \$opt_eth_header, + 'esp:s' = \$opt_esp, 'diff' = \$opt_diff, 'odl' = \$opt_odl, 'keep' = \$opt_keep, @@ -161,8 +165,8 @@ if ($opt_com_header) { my $res = COMHeader::Parse($pidl); if ($res) { - my $h_filename = dirname($output) . /com_$basename.h; - util::FileSave($h_filename, + my $comh_filename = dirname($output) . /com_$basename.h; + util::FileSave($comh_filename, #include \librpc/gen_ndr/ndr_orpc.h\\n . #include \librpc/gen_ndr/ndr_$basename.h\\n . $res); @@ -190,7 +194,7 @@ $pidl = ODL::ODL2IDL($pidl); } - if (defined($opt_header) or defined($opt_eth_parser) or defined($opt_eth_header) or $opt_client or $opt_server or defined($opt_parser)) { + if (defined($opt_header) or defined($opt_eth_parser) or defined($opt_eth_header) or $opt_client or $opt_server or defined($opt_parser) or defined($opt_esp)) { $ndr = Ndr::Parse($pidl); # print util::MyDumper($ndr); } @@ -209,6 +213,7 @@ } } + if (defined($opt_eth_header)) { my($eparserhdr) = $opt_eth_header; if ($eparserhdr eq ) { @@ -218,15 +223,20 @@ util::FileSave($eparserhdr, EthHeader::Parse($ndr)); } + my $h_filename = util::ChangeExtension($output, .h); if ($opt_client) { my ($client) =
svn commit: samba r7161 - in branches/SAMBA_4_0: source/build/pidl testprogs/win32/rpcecho
Author: jelmer Date: 2005-06-01 00:34:28 + (Wed, 01 Jun 2005) New Revision: 7161 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7161 Log: - Add support for aliases for pidls scalar types and add a few aliases. - Define __PIDL__ when preprocessing IDL files. - Remove a couple of useless defines from rpcecho.idl rpcecho.idl now works in both pidl and midl (althought pidl is a bit pedantic and gives two warnings) Modified: branches/SAMBA_4_0/source/build/pidl/idl.pm branches/SAMBA_4_0/source/build/pidl/idl.yp branches/SAMBA_4_0/source/build/pidl/typelist.pm branches/SAMBA_4_0/testprogs/win32/rpcecho/rpcecho.idl Changeset: Modified: branches/SAMBA_4_0/source/build/pidl/idl.pm === --- branches/SAMBA_4_0/source/build/pidl/idl.pm 2005-06-01 00:12:34 UTC (rev 7160) +++ branches/SAMBA_4_0/source/build/pidl/idl.pm 2005-06-01 00:34:28 UTC (rev 7161) @@ -2470,7 +2470,7 @@ if (! defined $cpp) { $cpp = cpp } - my $data = `$cpp -xc $filename`; + my $data = `$cpp -D__PIDL__ -xc $filename`; $/ = $saved_delim; $self-YYData-{INPUT} = $data; Modified: branches/SAMBA_4_0/source/build/pidl/idl.yp === --- branches/SAMBA_4_0/source/build/pidl/idl.yp 2005-06-01 00:12:34 UTC (rev 7160) +++ branches/SAMBA_4_0/source/build/pidl/idl.yp 2005-06-01 00:34:28 UTC (rev 7161) @@ -384,7 +384,7 @@ if (! defined $cpp) { $cpp = cpp } - my $data = `$cpp -xc $filename`; + my $data = `$cpp -D__PIDL__ -xc $filename`; $/ = $saved_delim; $self-YYData-{INPUT} = $data; Modified: branches/SAMBA_4_0/source/build/pidl/typelist.pm === --- branches/SAMBA_4_0/source/build/pidl/typelist.pm2005-06-01 00:12:34 UTC (rev 7160) +++ branches/SAMBA_4_0/source/build/pidl/typelist.pm2005-06-01 00:34:28 UTC (rev 7161) @@ -153,7 +153,7 @@ # it's a bug when a type is not in the list # of known scalars or has no mapping - return $scalars-{$name}{C_TYPE} if defined($scalars-{$name}) and defined($scalars-{$name}{C_TYPE}); + return $typedefs{$name}-{DATA}-{C_TYPE} if defined($typedefs{$name}) and defined($typedefs{$name}-{DATA}-{C_TYPE}); die(Unknown scalar type $name); } @@ -225,14 +225,30 @@ $typedefs{$k} = { NAME = $k, TYPE = TYPEDEF, - DATA = { - TYPE = SCALAR, - NAME = $k - } + DATA = $scalars-{$k} }; + $typedefs{$k}-{DATA}-{TYPE} = SCALAR; + $typedefs{$k}-{DATA}-{NAME} = $k; } } +my $aliases = { + DWORD = uint32, + int = int32, + WORD = uint16, + char = uint8, + long = int32, + short = int16, + hyper = HYPER_T +}; + +sub RegisterAliases() +{ + foreach my $k (keys %{$aliases}) { + $typedefs{$k} = $typedefs{$aliases-{$k}}; + } +} + sub enum_type_fn($) { my $enum = shift; @@ -304,5 +320,6 @@ } RegisterScalars(); +RegisterAliases(); 1; Modified: branches/SAMBA_4_0/testprogs/win32/rpcecho/rpcecho.idl === --- branches/SAMBA_4_0/testprogs/win32/rpcecho/rpcecho.idl 2005-06-01 00:12:34 UTC (rev 7160) +++ branches/SAMBA_4_0/testprogs/win32/rpcecho/rpcecho.idl 2005-06-01 00:34:28 UTC (rev 7161) @@ -18,6 +18,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef __PIDL__ +#define unistr [string] wchar_t * +#endif + [ uuid(60a15ec5-4de8-11d7-a637-005056a20182), version(1.0) @@ -45,13 +49,6 @@ [in] int len, [out] [size_is(len)] char out_data[] ); - -#define unistr [string] wchar_t * -#define uint8 char -#define uint16 short -#define uint32 long -#define HYPER_T hyper - const long myconstant = 42; /* test strings */ @@ -60,36 +57,35 @@ [out] unistr *s2 ); - /* test some alignment issues */ typedef struct { - uint8 v; + char v; } echo_info1; typedef struct { - uint16 v; + short v; } echo_info2; typedef struct { - uint32 v; + long v; } echo_info3; typedef struct { - HYPER_T v; + hyper v; } echo_info4; typedef struct { - uint8 v1; - HYPER_T v2; + char v1; + hyper v2; } echo_info5; typedef struct { - uint8 v1; + char v1; echo_info1 info1;
svn commit: samba r7163 - in branches/SAMBA_4_0: .
Author: tridge Date: 2005-06-01 01:36:07 + (Wed, 01 Jun 2005) New Revision: 7163 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7163 Log: a 2nd test commit to trigger anon update with new svn fsfs backend Modified: branches/SAMBA_4_0/howto.txt Changeset: Modified: branches/SAMBA_4_0/howto.txt === --- branches/SAMBA_4_0/howto.txt2005-06-01 01:29:36 UTC (rev 7162) +++ branches/SAMBA_4_0/howto.txt2005-06-01 01:36:07 UTC (rev 7163) @@ -173,3 +173,4 @@ If you get any Operation not permitted errors then it probably means you didn't try the test as root. +
svn commit: samba r7164 - in hooks: .
Author: tpot Date: 2005-06-01 01:47:22 + (Wed, 01 Jun 2005) New Revision: 7164 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=7164 Log: Comment out svndump --incremental for websvn as rsync should work properly now. Modified: hooks/post-commit Changeset: Modified: hooks/post-commit === --- hooks/post-commit 2005-06-01 01:36:07 UTC (rev 7163) +++ hooks/post-commit 2005-06-01 01:47:22 UTC (rev 7164) @@ -54,10 +54,10 @@ # Create a delta to apply to the websvn repository and send it over # to dp3. - -( - delta=/tmp/delta-${NAME}-`seq -f%08g ${REV} ${REV}` - - svnadmin dump ${REPOS} --incremental -r ${REV} $delta - rsync $delta dp3::svn-deltas rm -f $delta -) +# +#( +# delta=/tmp/delta-${NAME}-`seq -f%08g ${REV} ${REV}` +# +# svnadmin dump ${REPOS} --incremental -r ${REV} $delta +# rsync $delta dp3::svn-deltas rm -f $delta +#)