[Samba] vlan problem
hello, I want to use a samba server and an ldap server in two different lans. but win xp pc can not join to pdc domain. i ping the ldap server and smbldap-usershow shows the users but the net rpc getsid can not fetch sid and coputers can't be added to ldap. any idea? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Re: Samba AD auth - Backup?
Mark Adams m...@campbell-lange.net wrote in message news:20090227122641.ga4...@campbell-lange.net... Hi All, I haven't been able to track down any info on this so would be appreciative of any input. Links to any info on this would also be appreciated. Samba 3.2.5, Debian 5.0 Question 1; Is there any way of setting up a backup windows domain controller in the samba config? so if they main dc is not available, it automatically queries the backup? Take a look at Samba by Example chapter 5 Making Happy Users. Great info. on setting up PDC's and BDC's. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] vlan problem
whats the smb.conf of the samba server? did you do smbpasswd -w? Mohammad Reza Hosseini wrote: hello, I want to use a samba server and an ldap server in two different lans. but win xp pc can not join to pdc domain. i ping the ldap server and smbldap-usershow shows the users but the net rpc getsid can not fetch sid and coputers can't be added to ldap. any idea? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Manually expire duplicate netbios name
Hi! Yesterday, after migrating to a new server, I accidentally started an identically configured smbd and nmbd on the old machine. Since then, there are two netbios entries, even though the first host (192.168.60.5) is down since yesterday: # nmblookup -U localhost -R 'SAMBA' querying SAMBA on 127.0.0.1 192.168.60.5 SAMBA00 192.168.60.3 SAMBA00 I've already tried to remove NBT/SAMBA#20\0 from /var/lib/samba/gencache.tdb using tdbtool. Besides, I deleted suspicious entried from wins.dat. (Both with or without nmbd running.) Unfortunately I don't know how to remove them from wins.tdb. When restarting nmbd, it complains that there is already a domain master browser, but it queries it's own wins-server (192.168.60.3). (See below.) Any hints on how I can manually delete the wrong ip address from the netbios-cache / wins server? Thanks, --leo Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/asyncdns.c:start_async_dns(155) Mar 1 18:58:08 samba nmbd[23487]: started asyncdns process 23488 Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/nmbd_logonnames.c:add_logon_names(160) Mar 1 18:58:08 samba nmbd[23487]: add_domain_logon_names: Mar 1 18:58:08 samba nmbd[23487]: Attempting to become logon server for workgroup RK_KLBG on subnet 192.168.60.3 Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/nmbd_logonnames.c:add_logon_names(160) Mar 1 18:58:08 samba nmbd[23487]: add_domain_logon_names: Mar 1 18:58:08 samba nmbd[23487]: Attempting to become logon server for workgroup RK_KLBG on subnet UNICAST_SUBNET Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(336) Mar 1 18:58:08 samba nmbd[23487]: become_domain_master_browser_wins: Mar 1 18:58:08 samba nmbd[23487]: Attempting to become domain master browser on workgroup RK_KLBG, subnet UNICAST_SUBNET. Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(350) Mar 1 18:58:08 samba nmbd[23487]: become_domain_master_browser_wins: querying WINS server from IP 192.168.60.3 for domain master browser name RK_KLBG1b on workgroup RK_KLBG Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/nmbd_become_dmb.c:become_domain_master_query_success(234) Mar 1 18:58:08 samba nmbd[23487]: become_domain_master_query_success: Mar 1 18:58:08 samba nmbd[23487]: There is already a domain master browser at IP 192.168.60.5 for workgroup RK_KLBG registered on subnet UNICAST_SUBNET. Mar 1 18:58:08 samba nmbd[23487]: [2009/03/01 18:58:08, 0] nmbd/nmbd_logonnames.c:become_logon_server_success(121) Mar 1 18:58:08 samba nmbd[23487]: become_logon_server_success: Samba is now a logon server for workgroup RK_KLBG on subnet UNICAST_SUBNET Mar 1 18:58:12 samba nmbd[23487]: [2009/03/01 18:58:12, 0] nmbd/nmbd_logonnames.c:become_logon_server_success(121) Mar 1 18:58:12 samba nmbd[23487]: become_logon_server_success: Samba is now a logon server for workgroup RK_KLBG on subnet 192.168.60.3 -- e-mail ::: Leo.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: IT-Services | Vienna University of Economics | Austria -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba AD auth - Backup?
Everything should be looked up by DNS. There's no notion of a PDC/BDC in AD (although 2008 has readonly slaves I believe). On Fri, Feb 27, 2009 at 7:26 AM, Mark Adams m...@campbell-lange.net wrote: Hi All, I haven't been able to track down any info on this so would be appreciative of any input. Links to any info on this would also be appreciated. Samba 3.2.5, Debian 5.0 Question 1; Is there any way of setting up a backup windows domain controller in the samba config? so if they main dc is not available, it automatically queries the backup? Question 2; What is the best way to back up the UID/GID map? and can it be easily imported back to a new install if the server fails for any reason. Thanks Mark -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba 3.0 AD Integration restrict users
I have configured a Linux server so users can log in with their AD credentials. However, I have a directory I would like to share and restrict it to a few AD users. All these users will have read and execute access but only two users will have write access. The /srv/www/vhosts/marketing is the directory I would like to share. It is owned by root:marketing both have 777 permission to that dir. I have edited the /etc/group file and added one of the users to the marketing group but while trying to log in I can see permission denied when connecting to [marketing] in /var/log/messages Following is my smb.conf file. Thanks for any help; [global] workgroup = AD security = ADS realm = domain.com encrypt passwords = yes preferred master = no log level = 3 auth methods = winbind winbind enum users = yes winbind enum groups = yes winbind use default domain = yes idmap uid = 10-20 idmap gid = 10-20 netbios name = gandalf password server = 172.16.20.34 template homedir = /home/%D/%U template shell = /bin/bash [marketing] comment = Marketing Internal Web inherit acls = No path = /srv/www/vhosts/marketing read only = No guest ok = No browseable = Yes create mask = 4755 directory mask = 0770 Thanks. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] vlan problem
here is my smb.conf global section: # [global] server string = SOFTWARE workgroup = SOFTWARE ;security = user netbios name = S-SOFT passdb backend = ldapsam:ldap://ldapserver ldap admin dn = cn=Directory Manager ldap suffix = dc=iut,dc=ac,dc=ir ldap group suffix = ou=Groups ldap user suffix = ou=Users ldap machine suffix = ou=Computers ldap ssl = start_tls ;enable privileges = yes add machine script = /usr/sbin/smbldap-useradd -w %u add user script = /usr/sbin/smbldap-useradd -m %u ldap delete dn = Yes #delete user script = /usr/sbin/smbldap-userdel %u add group script = /usr/sbin/smbldap-groupadd -p %g #delete group script = /usr/sbin/smbldap-groupdel %g add user to group script = /usr/sbin/smbldap-groupmod -m %u %g delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g set primary group script = /usr/sbin/smbldap-usermod -g %g %u ldap passwd sync = Yes log level = 1 syslog = 0 log file = /var/log/samba/%m ;encrypt passwords = yes os level = 69 max log size = 50 name resolve order = wins bcast hosts time server = Yes wins support = Yes socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192 logon script = logon.bat logon path = logon drive = domain logons = Yes preferred master = Yes domain master = Yes ;local master = yes username map = /etc/samba/smbusers interfaces = 127.0.0.1 eth* bind interfaces only = yes hosts allow = 172.16. 192.168. # 2009/3/1 Adam Williams awill...@mdah.state.ms.us whats the smb.conf of the samba server? did you do smbpasswd -w? Mohammad Reza Hosseini wrote: hello, I want to use a samba server and an ldap server in two different lans. but win xp pc can not join to pdc domain. i ping the ldap server and smbldap-usershow shows the users but the net rpc getsid can not fetch sid and coputers can't be added to ldap. any idea? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] samba user stays at the syatem !!!
Dear list, Here is a very strange problem !!! I am using samba-3.0.25b-1.1.cc in clarkconnect server. No problem to use the samba shares at all. Authentication works with no hitch. But samba users stay at the system. I have just checked with who and found there are 250 samba users from 1st of Jan ! I tried to fond out the pid by who -a and kill those but then it says no such pid even I tried *smbstatus* but kill says no such pid. I have really no clue what to do with this problem. Day by day this system is flooded with more and more samba users. Kindly suggest what to do. How can I kill those past samba users ? How can I instruct samba no to have the continue with unlogged users ? Please show me the way. thanks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-88-g4a35c97
The branch, master has been updated via 4a35c974e97551b1ccbfa41d4c08f0598e3c26aa (commit) from 79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4a35c974e97551b1ccbfa41d4c08f0598e3c26aa Author: Volker Lendecke v...@samba.org Date: Sun Mar 1 11:39:44 2009 +0100 Only copy sharename up from rap_to_pjobid Why?? :-) Another one of the little micro-optimizations that I just came across: If you allocate a variable in a sub-block like the fstring sharename in write_file(), gcc even with -O3 will allocate this variable unconditionally on the stack at the beginning of the routine. So with eliminating this fstring we cut 256 bytes of stack in a very hot code path writing to a file. It might make us a bit more cache-friendly. This would probably not be worth a second look if it involved larger code changes, but this one was just too simple to let it pass :-) --- Summary of changes: source3/printing/printfsp.c |3 +-- source3/printing/printing.c |4 +++- source3/smbd/fileio.c |3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c index b485711..243b8ea 100644 --- a/source3/printing/printfsp.c +++ b/source3/printing/printfsp.c @@ -88,7 +88,6 @@ NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn, void print_fsp_end(files_struct *fsp, enum file_close_type close_type) { uint32 jobid; - fstring sharename; if (fsp-fh-private_options FILE_DELETE_ON_CLOSE) { /* @@ -102,7 +101,7 @@ void print_fsp_end(files_struct *fsp, enum file_close_type close_type) string_free(fsp-fsp_name); } - if (!rap_to_pjobid(fsp-rap_print_jobid, sharename, jobid)) { + if (!rap_to_pjobid(fsp-rap_print_jobid, NULL, jobid)) { DEBUG(3,(print_fsp_end: Unable to convert RAP jobid %u to print jobid.\n, (unsigned int)fsp-rap_print_jobid )); return; diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 49bd5ac..fc3667e 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -117,7 +117,9 @@ bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid) if ( data.dptr data.dsize == sizeof(struct rap_jobid_key) ) { struct rap_jobid_key *jinfo = (struct rap_jobid_key*)data.dptr; - fstrcpy( sharename, jinfo-sharename ); + if (sharename != NULL) { + fstrcpy( sharename, jinfo-sharename ); + } *pjobid = jinfo-jobid; DEBUG(10,(rap_to_pjobid: jobid %u maps to RAP jobid %u\n, (unsigned int)*pjobid, (unsigned int)rap_jobid)); diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index a9a97a2..adf664b 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -256,10 +256,9 @@ ssize_t write_file(struct smb_request *req, int write_path = -1; if (fsp-print_file) { - fstring sharename; uint32 jobid; - if (!rap_to_pjobid(fsp-rap_print_jobid, sharename, jobid)) { + if (!rap_to_pjobid(fsp-rap_print_jobid, NULL, jobid)) { DEBUG(3,(write_file: Unable to map RAP jobid %u to jobid.\n, (unsigned int)fsp-rap_print_jobid )); errno = EBADF; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-91-g54bc27e
The branch, master has been updated via 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (commit) via 55903e6f9120f1ec58a8554813229975c3028a09 (commit) via d776ac03c3ce8a9090b847f20d2cdd16d745441f (commit) from 4a35c974e97551b1ccbfa41d4c08f0598e3c26aa (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 Merge: 55903e6f9120f1ec58a8554813229975c3028a09 4a35c974e97551b1ccbfa41d4c08f0598e3c26aa Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:23:53 2009 +0100 Merge branch 'master' of ssh://git.samba.org/data/git/samba into talloc-next commit 55903e6f9120f1ec58a8554813229975c3028a09 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:19:38 2009 +0100 Move next_token_talloc to util.c, as util_str.c is only compiled inside samba 4. commit d776ac03c3ce8a9090b847f20d2cdd16d745441f Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:16:16 2009 +0100 Move next_token_talloc() to top-level. --- Summary of changes: lib/util/util.c| 100 ++ lib/util/util.h| 15 ++ source3/lib/util_str.c | 112 3 files changed, 115 insertions(+), 112 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/util.c b/lib/util/util.c index 988d8f9..1f31f55 100644 --- a/lib/util/util.c +++ b/lib/util/util.c @@ -836,4 +836,104 @@ _PUBLIC_ size_t utf16_len_n(const void *src, size_t n) return len; } +/** + * @file + * @brief String utilities. + **/ + +static bool next_token_internal_talloc(TALLOC_CTX *ctx, + const char **ptr, +char **pp_buff, +const char *sep, +bool ltrim) +{ + char *s; + char *saved_s; + char *pbuf; + bool quoted; + size_t len=1; + + *pp_buff = NULL; + if (!ptr) { + return(false); + } + + s = (char *)*ptr; + + /* default to simple separators */ + if (!sep) { + sep = \t\n\r; + } + + /* find the first non sep char, if left-trimming is requested */ + if (ltrim) { + while (*s strchr_m(sep,*s)) { + s++; + } + } + + /* nothing left? */ + if (!*s) { + return false; + } + + /* When restarting we need to go from here. */ + saved_s = s; + + /* Work out the length needed. */ + for (quoted = false; *s + (quoted || !strchr_m(sep,*s)); s++) { + if (*s == '\') { + quoted = !quoted; + } else { + len++; + } + } + + /* We started with len = 1 so we have space for the nul. */ + *pp_buff = talloc_array(ctx, char, len); + if (!*pp_buff) { + return false; + } + + /* copy over the token */ + pbuf = *pp_buff; + s = saved_s; + for (quoted = false; *s + (quoted || !strchr_m(sep,*s)); s++) { + if ( *s == '\' ) { + quoted = !quoted; + } else { + *pbuf++ = *s; + } + } + + *ptr = (*s) ? s+1 : s; + *pbuf = 0; + + return true; +} + +bool next_token_talloc(TALLOC_CTX *ctx, + const char **ptr, + char **pp_buff, + const char *sep) +{ + return next_token_internal_talloc(ctx, ptr, pp_buff, sep, true); +} + +/* + * Get the next token from a string, return false if none found. Handles + * double-quotes. This version does not trim leading separator characters + * before looking for a token. + */ + +bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx, + const char **ptr, + char **pp_buff, + const char *sep) +{ + return next_token_internal_talloc(ctx, ptr, pp_buff, sep, false); +} + diff --git a/lib/util/util.h b/lib/util/util.h index 27f94cd..1f6e3b1 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -204,6 +204,21 @@ _PUBLIC_ void display_set_stderr(void); /* The following definitions come from lib/util/util_str.c */ +bool next_token_talloc(TALLOC_CTX *ctx, + const char **ptr, + char **pp_buff, + const char *sep); + +/** + * Get the next token from a string, return false if none found. Handles + * double-quotes. This version does not trim leading separator characters + * before looking for a token. + */ +bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx, + const char
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-93-g09ac816
The branch, master has been updated via 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (commit) via 235244f4cc707130dd130afce88bde49606bd501 (commit) from 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 Merge: 235244f4cc707130dd130afce88bde49606bd501 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:39:35 2009 +0100 Merge branch 'master' of git://git.samba.org/samba into teventfix Conflicts: lib/tevent/pytevent.c commit 235244f4cc707130dd130afce88bde49606bd501 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:38:07 2009 +0100 Avoid using tevent_util.h, which won't be available if we use the system tevent. --- Summary of changes: lib/tevent/pytevent.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index 3b45ba1..fe7e7e3 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -29,7 +29,6 @@ #include tevent.h #include stdbool.h -#include tevent_util.h typedef struct { PyObject_HEAD @@ -54,7 +53,8 @@ static PyObject *py_backend_list(PyObject *self) PyObject *ret; int i, len; -len = ev_str_list_length(backends); +for (len = 0; backends[len]; len++); + ret = PyList_New(len); for (i = 0; i len; i++) PyList_SetItem(ret, i, PyString_FromString(backends[i])); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-96-g08b180e
The branch, master has been updated via 08b180e40e5179cc02d4aa1867d5063f47b85790 (commit) via 74293f117b08ffefdad78828ad9cfa8f8f6049e0 (commit) via e2469e37488fe46257f1f4f4f8b0ebe11c08da47 (commit) from 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 08b180e40e5179cc02d4aa1867d5063f47b85790 Merge: 74293f117b08ffefdad78828ad9cfa8f8f6049e0 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 17:13:10 2009 +0100 Merge branch 'master' of ssh://git.samba.org/data/git/samba into talloc-next commit 74293f117b08ffefdad78828ad9cfa8f8f6049e0 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 17:09:45 2009 +0100 Rerun pidl. commit e2469e37488fe46257f1f4f4f8b0ebe11c08da47 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 17:09:07 2009 +0100 Don't generate array iterators when the length of the array is always 0. (bug #6140) --- Summary of changes: librpc/gen_ndr/ndr_drsblobs.c|6 -- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 10 -- 2 files changed, 8 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/gen_ndr/ndr_drsblobs.c b/librpc/gen_ndr/ndr_drsblobs.c index 72e182d..ee7c993 100644 --- a/librpc/gen_ndr/ndr_drsblobs.c +++ b/librpc/gen_ndr/ndr_drsblobs.c @@ -1870,9 +1870,6 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *n for (cntr_keys_0 = 0; cntr_keys_0 r-num_keys; cntr_keys_0++) { NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, r-keys[cntr_keys_0])); } - for (cntr_service_keys_0 = 0; cntr_service_keys_0 0; cntr_service_keys_0++) { - NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, r-service_keys[cntr_service_keys_0])); - } for (cntr_old_keys_0 = 0; cntr_old_keys_0 r-num_old_keys; cntr_old_keys_0++) { NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_SCALARS, r-old_keys[cntr_old_keys_0])); } @@ -1885,9 +1882,6 @@ static enum ndr_err_code ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *n for (cntr_keys_0 = 0; cntr_keys_0 r-num_keys; cntr_keys_0++) { NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, r-keys[cntr_keys_0])); } - for (cntr_service_keys_0 = 0; cntr_service_keys_0 0; cntr_service_keys_0++) { - NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, r-service_keys[cntr_service_keys_0])); - } for (cntr_old_keys_0 = 0; cntr_old_keys_0 r-num_old_keys; cntr_old_keys_0++) { NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, NDR_BUFFERS, r-old_keys[cntr_old_keys_0])); } diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 0e4a7e2..34aebc7 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -586,9 +586,15 @@ sub ParseElementPushLevel my $length = ParseExpr($l-{LENGTH_IS}, $env, $e-{ORIGINAL}); my $counter = cntr_$e-{NAME}_$l-{LEVEL_INDEX}; + my $array_pointless = ($length eq 0); + + if ($array_pointless) { + warning($e-{ORIGINAL}, pointless array `$e-{NAME}' will always have size 0); + } + $var_name = get_array_element($var_name, $counter); - if (($primitives and not $l-{IS_DEFERRED}) or ($deferred and $l-{IS_DEFERRED})) { + if ((($primitives and not $l-{IS_DEFERRED}) or ($deferred and $l-{IS_DEFERRED})) and not $array_pointless) { $self-pidl(for ($counter = 0; $counter $length; $counter++) {); $self-indent; $self-ParseElementPushLevel($e, GetNextLevel($e, $l), $ndr, $var_name, $env, 1, 0); @@ -596,7 +602,7 @@ sub ParseElementPushLevel $self-pidl(}); } - if ($deferred and ContainsDeferred($e, $l)) { + if ($deferred and ContainsDeferred($e, $l) and not $array_pointless) { $self-pidl(for ($counter = 0; $counter $length; $counter++) {); $self-indent; $self-ParseElementPushLevel($e, GetNextLevel($e, $l), $ndr, $var_name, $env, 0, 1); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-100-gbbe2d30
The branch, master has been updated via bbe2d30f66ebd8537203870b1225179f03d42744 (commit) via 4903d20c215a01f70c242cb8cf4d455d0e352b7f (commit) via 9f6e2d64852026d118c717d80236177fd74331eb (commit) via 9ffb6d2d9e78ed192b8215194b6328d03d1ddad3 (commit) from 08b180e40e5179cc02d4aa1867d5063f47b85790 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bbe2d30f66ebd8537203870b1225179f03d42744 Merge: 4903d20c215a01f70c242cb8cf4d455d0e352b7f 08b180e40e5179cc02d4aa1867d5063f47b85790 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 17:29:04 2009 +0100 Merge branch 'master' of git://git.samba.org/samba into convenience commit 4903d20c215a01f70c242cb8cf4d455d0e352b7f Merge: 9f6e2d64852026d118c717d80236177fd74331eb 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:41:57 2009 +0100 Merge branch 'master' of git://git.samba.org/samba into convenience commit 9f6e2d64852026d118c717d80236177fd74331eb Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 12:59:58 2009 +0100 Sync smb_iconv_t type, convert_string return type with Samba 3 equivalents. commit 9ffb6d2d9e78ed192b8215194b6328d03d1ddad3 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 06:33:40 2009 +0100 Add allow_badcharcnv argument to all conversion function, for consistency with Samba 3. --- Summary of changes: lib/util/charset/charcnv.c | 11 +++- lib/util/charset/charset.h | 11 lib/util/charset/tests/iconv.c |6 ++-- lib/util/charset/util_unistr.c | 31 --- source3/include/includes.h |2 +- source3/include/proto.h|9 --- source3/include/smb.h | 16 source4/auth/ntlm/ntlm_check.c |2 +- source4/dsdb/common/util.c |2 +- source4/dsdb/samdb/ldb_modules/password_hash.c |6 ++-- source4/dsdb/schema/schema_init.c |2 +- source4/dsdb/schema/schema_syntax.c|8 +++--- source4/kdc/kpasswdd.c |4 +- source4/lib/registry/ldb.c |4 +- source4/lib/registry/tests/generic.c |6 ++-- source4/lib/registry/util.c|4 +- source4/lib/tdr/tdr.c |4 +- source4/libcli/raw/rawfileinfo.c |2 +- source4/libcli/raw/rawrequest.c|8 +++--- source4/libcli/smb2/request.c |4 +- source4/libnet/libnet_samdump.c|2 +- source4/librpc/ndr/ndr_string.c| 20 +++--- source4/rpc_server/samr/samr_password.c|6 ++-- source4/smb_server/smb/request.c |4 +- source4/torture/basic/charset.c|2 +- source4/torture/basic/utable.c |4 +- source4/torture/rpc/samlogon.c |2 +- source4/torture/rpc/spoolss_win.c |2 +- 28 files changed, 84 insertions(+), 100 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/charset/charcnv.c b/lib/util/charset/charcnv.c index 1f3b1ac..18be2bc 100644 --- a/lib/util/charset/charcnv.c +++ b/lib/util/charset/charcnv.c @@ -240,7 +240,7 @@ convert: _PUBLIC_ ssize_t convert_string_convenience(struct smb_iconv_convenience *ic, charset_t from, charset_t to, void const *src, size_t srclen, - void *dest, size_t destlen) + void *dest, size_t destlen, bool allow_badcharcnv) { size_t i_len, o_len; size_t retval; @@ -248,6 +248,10 @@ _PUBLIC_ ssize_t convert_string_convenience(struct smb_iconv_convenience *ic, char* outbuf = (char*)dest; smb_iconv_t descriptor; + if (allow_badcharcnv) { + return -1; + } + if (srclen == (size_t)-1) srclen = strlen(inbuf)+1; @@ -305,10 +309,13 @@ _PUBLIC_ ssize_t convert_string_talloc_convenience(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, charset_t from, charset_t to, void const *src, size_t srclen, - void **dest) + void **dest, bool allow_badcharcnv) { smb_iconv_t descriptor; + if (allow_badcharcnv) + return (size_t)-1; + *dest = NULL; if (src == NULL || srclen == (size_t)-1 || srclen == 0) diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h index
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-101-g99b2881
The branch, master has been updated via 99b288156f021db7bb771f3a5bf78def61d699f2 (commit) from bbe2d30f66ebd8537203870b1225179f03d42744 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 99b288156f021db7bb771f3a5bf78def61d699f2 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 17:59:30 2009 +0100 Move secace.c to top-level. --- Summary of changes: {source3/lib = libcli/security}/secace.c | 90 source3/Makefile.in |3 +- source3/include/rpc_secdes.h |1 - source3/lib/util_nttoken.c| 16 + source4/libcli/security/config.mk |3 +- 5 files changed, 59 insertions(+), 54 deletions(-) rename {source3/lib = libcli/security}/secace.c (76%) Changeset truncated at 500 lines: diff --git a/source3/lib/secace.c b/libcli/security/secace.c similarity index 76% rename from source3/lib/secace.c rename to libcli/security/secace.c index 878fac2..4e8eddc 100644 --- a/source3/lib/secace.c +++ b/libcli/security/secace.c @@ -1,6 +1,6 @@ /* * Unix SMB/Netbios implementation. - * SEC_ACE handling functions + * struct security_ace handling functions * Copyright (C) Andrew Tridgell 1992-1998, * Copyright (C) Jeremy R. Allison1995-2003. * Copyright (C) Luke Kenneth Casson Leighton 1996-1998, @@ -21,56 +21,58 @@ */ #include includes.h +#include librpc/gen_ndr/ndr_security.h +#include libcli/security/security.h -/*** - Check if ACE has OBJECT type. -/ +#define SEC_ACE_HEADER_SIZE (2 * sizeof(uint8_t) + sizeof(uint16_t) + sizeof(uint32_t)) -bool sec_ace_object(uint8 type) +/** + * Check if ACE has OBJECT type. + */ +bool sec_ace_object(uint8_t type) { if (type == SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT || type == SEC_ACE_TYPE_ACCESS_DENIED_OBJECT || type == SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT || type == SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT) { - return True; + return true; } - return False; + return false; } -/*** - copy a SEC_ACE structure. -/ -void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src) +/** + * copy a struct security_ace structure. + */ +void sec_ace_copy(struct security_ace *ace_dest, struct security_ace *ace_src) { ace_dest-type = ace_src-type; ace_dest-flags = ace_src-flags; ace_dest-size = ace_src-size; ace_dest-access_mask = ace_src-access_mask; ace_dest-object = ace_src-object; - sid_copy(ace_dest-trustee, ace_src-trustee); + ace_dest-trustee = ace_src-trustee; } /*** - Sets up a SEC_ACE structure. + Sets up a struct security_ace structure. / -void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type, - uint32_t mask, uint8 flag) +void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum security_ace_type type, + uint32_t mask, uint8_t flag) { t-type = type; t-flags = flag; t-size = ndr_size_dom_sid(sid, NULL, 0) + 8; t-access_mask = mask; - ZERO_STRUCTP(t-trustee); - sid_copy(t-trustee, sid); + t-trustee = *sid; } /*** adds new SID with its permissions to ACE list / -NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask) +NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct security_ace *old, unsigned *num, struct dom_sid *sid, uint32_t mask) { unsigned int i = 0; @@ -78,7 +80,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsign *num += 1; - if((pp_new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0) + if((pp_new[0] = talloc_zero_array(ctx, struct security_ace, *num )) == 0) return NT_STATUS_NO_MEMORY; for (i = 0; i *num - 1; i ++) @@ -88,7 +90,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, unsign (*pp_new)[i].flags = 0; (*pp_new)[i].size = SEC_ACE_HEADER_SIZE + ndr_size_dom_sid(sid, NULL, 0); (*pp_new)[i].access_mask = mask; - sid_copy((*pp_new)[i].trustee, sid); + (*pp_new)[i].trustee = *sid;
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-102-g9bd0cf8
The branch, master has been updated via 9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0 (commit) from 99b288156f021db7bb771f3a5bf78def61d699f2 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 18:02:24 2009 +0100 Keep using Samba3's charset.h for now. --- Summary of changes: source3/include/includes.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/includes.h b/source3/include/includes.h index 7f8c408..523a11e 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -594,7 +594,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include trans2.h #include ../libcli/util/error.h #include ntioctl.h -#include ../lib/util/charset/charset.h +#include charset.h #include dynconfig.h #include util_getent.h #include debugparse.h -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-105-gda6721e
The branch, master has been updated via da6721e3231fb93b934440c2d92abab834289c82 (commit) via e9bba3e288a204732775427dd4098d7dea2cafd9 (commit) via d3c2de093a35d0168fead27787a3da44a39fbea9 (commit) from 9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit da6721e3231fb93b934440c2d92abab834289c82 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 18:15:36 2009 +0100 Move secacl to top-level. commit e9bba3e288a204732775427dd4098d7dea2cafd9 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 18:15:15 2009 +0100 dom_sid.h: Include dependency security.h that provides the dom_sid struct. commit d3c2de093a35d0168fead27787a3da44a39fbea9 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 18:05:22 2009 +0100 Also re-add removed codepoint_t; I'm clearly not having my day today. --- Summary of changes: libcli/security/dom_sid.h |2 + {source3/lib = libcli/security}/secacl.c | 34 source3/Makefile.in |2 +- source3/include/rpc_secdes.h |1 - source3/include/smb.h | 16 + source4/libcli/security/config.mk |3 +- 6 files changed, 40 insertions(+), 18 deletions(-) rename {source3/lib = libcli/security}/secacl.c (79%) Changeset truncated at 500 lines: diff --git a/libcli/security/dom_sid.h b/libcli/security/dom_sid.h index 9d96392..e892535 100644 --- a/libcli/security/dom_sid.h +++ b/libcli/security/dom_sid.h @@ -23,6 +23,8 @@ #ifndef _DOM_SID_H_ #define _DOM_SID_H_ +#include librpc/gen_ndr/security.h + int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid2); bool dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2); bool dom_sid_parse(const char *sidstr, struct dom_sid *ret); diff --git a/source3/lib/secacl.c b/libcli/security/secacl.c similarity index 79% rename from source3/lib/secacl.c rename to libcli/security/secacl.c index 5e82242..4564077 100644 --- a/source3/lib/secacl.c +++ b/libcli/security/secacl.c @@ -21,18 +21,22 @@ */ #include includes.h +#include libcli/security/security.h + +#define SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t)) /*** Create a SEC_ACL structure. / -SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision, - int num_aces, SEC_ACE *ace_list) +struct security_acl *make_sec_acl(TALLOC_CTX *ctx, + enum security_acl_revision revision, + int num_aces, struct security_ace *ace_list) { - SEC_ACL *dst; + struct security_acl *dst; int i; - if((dst = TALLOC_ZERO_P(ctx,SEC_ACL)) == NULL) + if((dst = talloc_zero(ctx, struct security_acl)) == NULL) return NULL; dst-revision = revision; @@ -46,7 +50,7 @@ SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision, positive number. */ if ((num_aces) -((dst-aces = TALLOC_ARRAY(ctx, SEC_ACE, num_aces)) +((dst-aces = talloc_array(ctx, struct security_ace, num_aces)) == NULL)) { return NULL; } @@ -63,7 +67,7 @@ SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision, Duplicate a SEC_ACL structure. / -SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src) +struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src) { if(src == NULL) return NULL; @@ -75,44 +79,44 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src) Compares two SEC_ACL structures / -bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2) +bool sec_acl_equal(struct security_acl *s1, struct security_acl *s2) { unsigned int i, j; /* Trivial cases */ - if (!s1 !s2) return True; - if (!s1 || !s2) return False; + if (!s1 !s2) return true; + if (!s1 || !s2) return false; /* Check top level stuff */ if (s1-revision != s2-revision) { DEBUG(10, (sec_acl_equal(): revision differs (%d != %d)\n, s1-revision, s2-revision)); - return False; + return false; } if (s1-num_aces != s2-num_aces) { DEBUG(10, (sec_acl_equal(): num_aces differs (%d != %d)\n, s1-revision, s2-revision)); -
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-106-g8568b4f
The branch, master has been updated via 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e (commit) from da6721e3231fb93b934440c2d92abab834289c82 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 20:06:55 2009 +0100 Add header files for secace and secacl. --- Summary of changes: libcli/security/secace.h | 39 libcli/security/secacl.h | 33 ++ source3/include/includes.h |2 + source3/include/proto.h| 23 + source4/libcli/security/security.h |3 +- 5 files changed, 77 insertions(+), 23 deletions(-) create mode 100644 libcli/security/secace.h create mode 100644 libcli/security/secacl.h Changeset truncated at 500 lines: diff --git a/libcli/security/secace.h b/libcli/security/secace.h new file mode 100644 index 000..8b6625d --- /dev/null +++ b/libcli/security/secace.h @@ -0,0 +1,39 @@ +/* + Unix SMB/CIFS implementation. + Samba utility functions + + Copyright (C) 2009 Jelmer Vernooij jel...@samba.org + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/. +*/ + +#ifndef _ACE_H_ +#define _ACE_H_ + +#include librpc/gen_ndr/security.h + +bool sec_ace_object(uint8_t type); +void sec_ace_copy(struct security_ace *ace_dest, struct security_ace *ace_src); +void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum security_ace_type type, + uint32_t mask, uint8_t flag); +NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct security_ace *old, unsigned *num, struct dom_sid *sid, uint32_t mask); +NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, struct dom_sid *sid, uint32_t mask); +NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct security_ace *old, uint32_t *num, struct dom_sid *sid); +bool sec_ace_equal(struct security_ace *s1, struct security_ace *s2); +int nt_ace_inherit_comp( struct security_ace *a1, struct security_ace *a2); +int nt_ace_canon_comp( struct security_ace *a1, struct security_ace *a2); +void dacl_sort_into_canonical_order(struct security_ace *srclist, unsigned int num_aces); + +#endif /*_ACE_H_*/ + diff --git a/libcli/security/secacl.h b/libcli/security/secacl.h new file mode 100644 index 000..9f1e8fa --- /dev/null +++ b/libcli/security/secacl.h @@ -0,0 +1,33 @@ +/* + Unix SMB/CIFS implementation. + Samba utility functions + + Copyright (C) 2009 Jelmer Vernooij jel...@samba.org + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/. +*/ + +#ifndef _SECACL_H_ +#define _SECACL_H_ + +#include librpc/gen_ndr/security.h + +struct security_acl *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision, + int num_aces, struct security_ace *ace_list); +struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src); +bool sec_acl_equal(struct security_acl *s1, struct security_acl *s2); + + +#endif /*_SECACL_H_*/ + diff --git a/source3/include/includes.h b/source3/include/includes.h index 523a11e..63c77ec 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -703,6 +703,8 @@ enum flush_reason_enum { #ifndef NO_PROTO_H #include proto.h #endif +#include libcli/security/secace.h +#include libcli/security/secacl.h #if defined(HAVE_POSIX_ACLS) #include modules/vfs_posixacl.h diff --git a/source3/include/proto.h b/source3/include/proto.h index eeb6f19..60f8ace 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -650,28
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-110-g9940c76
The branch, master has been updated via 9940c7690e2c1b225111d5d8e09cc735ebe296dd (commit) via 9551ab8f7b0e69349dc0c1ffb70a6f67163b242c (commit) via 7ab8f373c84c328b197f923287163e83371e7ccb (commit) via 94069bd2747a8397308c0b0b384f7bb4edd8f68b (commit) from 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9940c7690e2c1b225111d5d8e09cc735ebe296dd Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 22:31:10 2009 +0100 Use shared header file for character sets, remove old definitions from samba3 smb.h. commit 9551ab8f7b0e69349dc0c1ffb70a6f67163b242c Merge: 7ab8f373c84c328b197f923287163e83371e7ccb 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 22:25:57 2009 +0100 Merge branch 'master' of git://git.samba.org/samba into convenience commit 7ab8f373c84c328b197f923287163e83371e7ccb Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 22:24:34 2009 +0100 Use common header file for character set handling in Samba 3 and Samba 4. commit 94069bd2747a8397308c0b0b384f7bb4edd8f68b Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 19:55:46 2009 +0100 s4: Use same function signature for convert_* as s3. --- Summary of changes: lib/util/charset/charcnv.c | 42 +--- lib/util/charset/charset.h | 125 --- lib/util/charset/iconv.c |1 + lib/util/charset/tests/iconv.c | 11 +-- lib/util/charset/util_unistr.c | 44 + source3/Makefile.in|4 +- source3/include/charset.h | 128 source3/include/includes.h |2 +- source3/include/proto.h|3 +- source3/include/smb.h | 18 source3/lib/charcnv.c |2 +- source3/lib/iconv.c|4 +- source4/auth/ntlm/ntlm_check.c |2 +- source4/auth/ntlmssp/ntlmssp_parse.c | 36 --- source4/dsdb/common/util.c |2 +- source4/dsdb/samdb/ldb_modules/password_hash.c | 17 ++-- source4/dsdb/schema/schema_init.c |7 +- source4/dsdb/schema/schema_syntax.c| 24 ++--- source4/kdc/kpasswdd.c | 18 ++-- source4/lib/registry/ldb.c |8 +- source4/lib/registry/tests/generic.c | 12 +- source4/lib/registry/util.c|6 +- source4/lib/tdr/tdr.c | 12 +-- source4/libcli/auth/smbencrypt.c | 32 +++--- source4/libcli/raw/rawfileinfo.c |8 +- source4/libcli/raw/rawrequest.c| 32 --- source4/libcli/smb2/request.c | 18 ++-- source4/libnet/libnet_samdump.c|4 +- source4/librpc/ndr/ndr_string.c| 56 -- source4/rpc_server/samr/samr_password.c| 15 ++-- source4/smb_server/smb/request.c | 12 +- source4/torture/basic/charset.c|5 +- source4/torture/basic/utable.c | 13 ++- source4/torture/rpc/samba3rpc.c|2 +- source4/torture/rpc/samlogon.c | 10 +- source4/torture/rpc/spoolss_win.c |2 +- source4/torture/rpc/wkssvc.c |2 +- 37 files changed, 345 insertions(+), 394 deletions(-) delete mode 100644 source3/include/charset.h Changeset truncated at 500 lines: diff --git a/lib/util/charset/charcnv.c b/lib/util/charset/charcnv.c index 18be2bc..258730e 100644 --- a/lib/util/charset/charcnv.c +++ b/lib/util/charset/charcnv.c @@ -186,7 +186,7 @@ convert: destlen = 2 + (destlen*3); ob = talloc_realloc(ctx, outbuf, char, destlen); if (!ob) { - DEBUG(0, (convert_string_talloc: realloc failed!\n)); + DEBUG(0, (iconv_talloc: realloc failed!\n)); talloc_free(outbuf); return (size_t)-1; } else { @@ -237,10 +237,11 @@ convert: * @param destlen maximal length allowed for string * @returns the number of bytes occupied in the destination **/ -_PUBLIC_ ssize_t convert_string_convenience(struct smb_iconv_convenience *ic, +_PUBLIC_ bool convert_string_convenience(struct smb_iconv_convenience *ic, charset_t from, charset_t to, void const *src, size_t srclen, - void *dest, size_t destlen, bool allow_badcharcnv) + void *dest, size_t destlen, size_t *converted_size, +
Build status as of Mon Mar 2 00:00:02 2009
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2009-03-01 00:00:14.0 + +++ /home/build/master/cache/broken_results.txt 2009-03-02 00:00:40.0 + @@ -1,23 +1,23 @@ -Build status as of Sun Mar 1 00:00:02 2009 +Build status as of Mon Mar 2 00:00:02 2009 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 28 5 0 +ccache 28 6 0 ctdb 0 0 0 distcc 0 0 0 -ldb 29 28 0 -libreplace 29 11 0 +ldb 26 28 0 +libreplace 28 11 0 lorikeet-heimdal 26 14 0 -pidl 20 3 0 +pidl 19 3 0 ppp 12 0 0 rsync28 8 0 samba-docs 0 0 0 samba-gtk5 5 0 -samba_3_X_devel 28 25 0 -samba_3_X_test 27 27 3 -samba_4_0_test 29 28 1 -smb-build28 6 0 -talloc 27 28 0 -tdb 27 8 0 +samba_3_X_devel 27 26 0 +samba_3_X_test 26 26 2 +samba_4_0_test 28 27 0 +smb-build27 6 0 +talloc 28 28 0 +tdb 26 8 0
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-112-g9b0df44
The branch, master has been updated via 9b0df441e1bd836c433e11582650fa0171791485 (commit) via 664268a2877dc49a84eb140e837e01f08979c471 (commit) from 9940c7690e2c1b225111d5d8e09cc735ebe296dd (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9b0df441e1bd836c433e11582650fa0171791485 Author: Tim Prouty tpro...@samba.org Date: Sun Mar 1 13:58:46 2009 -0800 s3: Fix incompatible type warnings commit 664268a2877dc49a84eb140e837e01f08979c471 Author: Tim Prouty tpro...@samba.org Date: Fri Feb 27 14:47:47 2009 -0800 s3 OneFS: Refactor config code and cleanup includes --- Summary of changes: source3/Makefile.in |4 +- source3/lib/util_reg_api.c|2 +- source3/libgpo/gpo_ini.c |2 +- source3/modules/onefs.h | 136 + source3/modules/onefs_acl.c |3 + source3/modules/onefs_cbrl.c |1 + source3/modules/onefs_config.c| 276 + source3/modules/onefs_config.h| 158 +++ source3/modules/onefs_dir.c |2 + source3/modules/onefs_notify.c|1 + source3/modules/onefs_open.c |3 + source3/modules/onefs_streams.c |3 + source3/modules/onefs_system.c| 54 +-- source3/modules/vfs_onefs.c | 201 + source3/rpc_server/srv_eventlog_lib.c |2 +- 15 files changed, 458 insertions(+), 390 deletions(-) create mode 100644 source3/modules/onefs_config.c create mode 100644 source3/modules/onefs_config.h Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index abf6cfb..28b5437 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -672,8 +672,8 @@ VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o \ - modules/onefs_open.o modules/onefs_streams.o modules/onefs_dir.c \ - modules/onefs_cbrl.o modules/onefs_notify.o + modules/onefs_open.o modules/onefs_streams.o modules/onefs_dir.o \ + modules/onefs_cbrl.o modules/onefs_notify.o modules/onefs_config.o VFS_ONEFS_SHADOW_COPY_OBJ = modules/vfs_onefs_shadow_copy.o modules/onefs_shadow_copy.o PERFCOUNT_ONEFS_OBJ = modules/perfcount_onefs.o PERFCOUNT_TEST_OBJ = modules/perfcount_test.o diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c index 8f28e9c..9313193 100644 --- a/source3/lib/util_reg_api.c +++ b/source3/lib/util_reg_api.c @@ -92,7 +92,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx, } if (!convert_string_talloc(value, CH_UTF16LE, CH_UNIX, tmp, - length+2, value-v.sz.str, + length+2, (void **)value-v.sz.str, value-v.sz.len, False)) { SAFE_FREE(tmp); err = WERR_INVALID_PARAM; diff --git a/source3/libgpo/gpo_ini.c b/source3/libgpo/gpo_ini.c index aa8f7c7..edca855 100644 --- a/source3/libgpo/gpo_ini.c +++ b/source3/libgpo/gpo_ini.c @@ -83,7 +83,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx, } if (!convert_string_talloc(mem_ctx, CH_UTF16LE, CH_UNIX, data_in, n, - data_out, converted_size, False)) + (void **)data_out, converted_size, False)) { status = NT_STATUS_INVALID_BUFFER_SIZE; goto out; diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h index a0f4fe3..ebeece4 100644 --- a/source3/modules/onefs.h +++ b/source3/modules/onefs.h @@ -21,134 +21,6 @@ #ifndef _ONEFS_H #define _ONEFS_H -#include includes.h -#include oplock_onefs.h -#include sys/isi_acl.h - -/* OneFS Module smb.conf parameters and defaults */ - -/** -* Specifies when ACLs presented to Windows should be canonicalized -* into the ordering which Explorer expects. -*/ -enum onefs_acl_wire_format -{ - ACL_FORMAT_RAW, /** Never canonicalize */ - ACL_FORMAT_WINDOWS_SD, /** Only canonicalize synthetic ACLs */ - ACL_FORMAT_ALWAYS /** Always canonicalize */ -}; - -#define PARM_ONEFS_TYPE onefs -#define PARM_ACL_WIRE_FORMAT acl wire format -#define PARM_ACL_WIRE_FORMAT_DEFAULT ACL_FORMAT_WINDOWS_SD -#define PARM_ALLOW_EXECUTE_ALWAYS allow execute always -#define PARM_ALLOW_EXECUTE_ALWAYS_DEFAULT false -#define PARM_ATIME_NOW atime now files -#define PARM_ATIME_NOW_DEFAULT NULL -#define PARM_ATIME_STATIC atime static files -#define PARM_ATIME_STATIC_DEFAULT NULL -#define
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-115-g0a3ee53
The branch, master has been updated via 0a3ee53b50a10874b0ee0230b022b4277b5a6d96 (commit) via 2d7a3748b2063c4137ee98ceca85361651ef8ee7 (commit) via c7b9757b8ac3ac6baa478655a4d2f77dff8240a8 (commit) from 9b0df441e1bd836c433e11582650fa0171791485 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0a3ee53b50a10874b0ee0230b022b4277b5a6d96 Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 2 05:04:07 2009 +0100 Use samba3's own iconv implementation for now, until all changes are merged. commit 2d7a3748b2063c4137ee98ceca85361651ef8ee7 Merge: c7b9757b8ac3ac6baa478655a4d2f77dff8240a8 9b0df441e1bd836c433e11582650fa0171791485 Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 2 04:15:11 2009 +0100 Merge branch 'master' of git://git.samba.org/samba into convenience commit c7b9757b8ac3ac6baa478655a4d2f77dff8240a8 Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 2 04:12:57 2009 +0100 Import ISO-8859-1, 646 from Samba 3 iconv. --- Summary of changes: lib/util/charset/iconv.c | 29 + source3/Makefile.in |2 +- source3/lib/iconv.c |4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c index 98284ce..9825e4b 100644 --- a/lib/util/charset/iconv.c +++ b/lib/util/charset/iconv.c @@ -50,6 +50,7 @@ static size_t ascii_pull (void *,const char **, size_t *, char **, size_t *); static size_t ascii_push (void *,const char **, size_t *, char **, size_t *); +static size_t latin1_push (void *,const char **, size_t *, char **, size_t *); static size_t utf8_pull (void *,const char **, size_t *, char **, size_t *); static size_t utf8_push (void *,const char **, size_t *, char **, size_t *); static size_t utf16_munged_pull(void *,const char **, size_t *, char **, size_t *); @@ -73,6 +74,8 @@ static const struct charset_functions builtin_functions[] = { {UTF16_MUNGED, utf16_munged_pull, iconv_copy}, {ASCII, ascii_pull, ascii_push}, + {646, ascii_pull, ascii_push}, + {ISO-8859-1, ascii_pull, latin1_push}, {UCS2-HEX, ucs2hex_pull, ucs2hex_push} }; @@ -341,6 +344,32 @@ static size_t ascii_push(void *cd, const char **inbuf, size_t *inbytesleft, return ir_count; } +static size_t latin1_push(void *cd, const char **inbuf, size_t *inbytesleft, +char **outbuf, size_t *outbytesleft) +{ + int ir_count=0; + + while (*inbytesleft = 2 *outbytesleft = 1) { + (*outbuf)[0] = (*inbuf)[0]; + if ((*inbuf)[1]) ir_count++; + (*inbytesleft) -= 2; + (*outbytesleft) -= 1; + (*inbuf) += 2; + (*outbuf) += 1; + } + + if (*inbytesleft == 1) { + errno = EINVAL; + return -1; + } + + if (*inbytesleft 1) { + errno = E2BIG; + return -1; + } + + return ir_count; +} static size_t ucs2hex_pull(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) diff --git a/source3/Makefile.in b/source3/Makefile.in index 28b5437..e9f4081 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -366,7 +366,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \ lib/substitute.o lib/dbwrap_util.o \ lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \ lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \ - ../lib/util/charset/iconv.o lib/pam_errors.o intl/lang_tdb.o \ + lib/iconv.o lib/pam_errors.o intl/lang_tdb.o \ lib/conn_tdb.o lib/adt_tree.o lib/gencache.o \ lib/module.o lib/events.o @LIBTEVENT_OBJ0@ \ lib/ldap_escape.o @CHARSET_STATIC@ \ diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c index fa213a3..4450054 100644 --- a/source3/lib/iconv.c +++ b/source3/lib/iconv.c @@ -207,12 +207,12 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode) from = charsets; to = charsets; - ret = SMB_MALLOC_P(smb_iconv_t); + ret = SMB_MALLOC_P(struct smb_iconv_s); if (!ret) { errno = ENOMEM; return (smb_iconv_t)-1; } - memset(ret, 0, sizeof(smb_iconv_t)); + memset(ret, 0, sizeof(struct smb_iconv_s)); ret-from_name = SMB_STRDUP(fromcode); ret-to_name = SMB_STRDUP(tocode); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-116-gcdbc00b
The branch, master has been updated via cdbc00bb52f39472fe5f1380b15180205644c8e9 (commit) from 0a3ee53b50a10874b0ee0230b022b4277b5a6d96 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cdbc00bb52f39472fe5f1380b15180205644c8e9 Author: Jelmer Vernooij jel...@samba.org Date: Mon Mar 2 05:07:30 2009 +0100 Fix test_surrounding in samba4.rpcecho.python. --- Summary of changes: .../scripting/python/samba/tests/dcerpc/rpcecho.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py index 12638e2..6226800 100644 --- a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py +++ b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py @@ -49,7 +49,7 @@ class RpcEchoTests(RpcInterfaceTestCase): surrounding_struct.x = 4 surrounding_struct.surrounding = [1,2,3,4] y = self.conn.TestSurrounding(surrounding_struct) -self.assertEquals(8 * [0], y.surrounding) +self.assertEquals(4 * [0], y.surrounding) def test_manual_request(self): self.assertEquals(\x01\x00\x00\x00, self.conn.request(0, chr(0) * 4)) -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-93-g09ac816
Jelmer Vernooij schrieb: The branch, master has been updated via 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (commit) via 235244f4cc707130dd130afce88bde49606bd501 (commit) from 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 09ac816b36e45fd537af2f7fe7c57a11f5c744f5 Merge: 235244f4cc707130dd130afce88bde49606bd501 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:39:35 2009 +0100 Merge branch 'master' of git://git.samba.org/samba into teventfix Conflicts: lib/tevent/pytevent.c commit 235244f4cc707130dd130afce88bde49606bd501 Author: Jelmer Vernooij jel...@samba.org Date: Sun Mar 1 16:38:07 2009 +0100 Avoid using tevent_util.h, which won't be available if we use the system tevent. --- Summary of changes: lib/tevent/pytevent.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index 3b45ba1..fe7e7e3 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -29,7 +29,6 @@ #include tevent.h #include stdbool.h -#include tevent_util.h typedef struct { PyObject_HEAD @@ -54,7 +53,8 @@ static PyObject *py_backend_list(PyObject *self) PyObject *ret; int i, len; -len = ev_str_list_length(backends); +for (len = 0; backends[len]; len++); + ret = PyList_New(len); for (i = 0; i len; i++) PyList_SetItem(ret, i, PyString_FromString(backends[i])); I think we should include pytevent in the standalone build and don't build it when we use the system tevent library. (We should do that for all statndalone libraries) metze signature.asc Description: OpenPGP digital signature
[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-117-gae1a69f
The branch, master has been updated via ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9 (commit) from cdbc00bb52f39472fe5f1380b15180205644c8e9 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9 Author: Stefan Metzmacher me...@samba.org Date: Mon Mar 2 08:55:00 2009 +0100 libcli/security: fix the source3 build metze --- Summary of changes: libcli/security/secace.c |2 +- libcli/security/secacl.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/security/secace.c b/libcli/security/secace.c index 4e8eddc..7d87b1c 100644 --- a/libcli/security/secace.c +++ b/libcli/security/secace.c @@ -22,7 +22,7 @@ #include includes.h #include librpc/gen_ndr/ndr_security.h -#include libcli/security/security.h +#include libcli/security/dom_sid.h #define SEC_ACE_HEADER_SIZE (2 * sizeof(uint8_t) + sizeof(uint16_t) + sizeof(uint32_t)) diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c index 4564077..f10cc09 100644 --- a/libcli/security/secacl.c +++ b/libcli/security/secacl.c @@ -21,7 +21,7 @@ */ #include includes.h -#include libcli/security/security.h +#include librpc/gen_ndr/ndr_security.h #define SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t)) -- Samba Shared Repository