metze/samba/wip.git
15 years agoCoverity fix CID: 592 - null deref (can't happen but doesn't hurt to be sure).
Jeremy Allison [Wed, 29 Oct 2008 23:02:16 +0000 (16:02 -0700)]
Coverity fix CID: 592 - null deref (can't happen but doesn't hurt to be sure).
Jeremy.

15 years agoCoverity fix #CID: 607 - resource leak on error path.
Jeremy Allison [Wed, 29 Oct 2008 22:54:57 +0000 (15:54 -0700)]
Coverity fix #CID: 607 - resource leak on error path.
Jeremy.

15 years agowinbind: fix smbd hanging on Solaris when winbindd closes socket.
Michael Adam [Mon, 27 Oct 2008 13:28:44 +0000 (14:28 +0100)]
winbind: fix smbd hanging on Solaris when winbindd closes socket.

On some versions of Solaris, we observed a strange effect of close(2)
on a socket: After the server (here winbindd) called close, the client fd
was not marked as readable for select. And a write call to the fd did
not produce an error EPIPE but just returned as if successful.

So while winbindd had called remove_client(), the corresponding smbd
still thought that it was connected, but failed to retrieve answers
for its queries.

This patch works around the problem by forcing the client fd to
the readable state: Just write one byte into the socket before
closing.

Michael

15 years agobuild: fix bug #5765 - fix installlibs on solaris by using portable "test -r"
Michael Adam [Mon, 27 Oct 2008 12:50:27 +0000 (13:50 +0100)]
build: fix bug #5765 - fix installlibs on solaris by using portable "test -r"

instead of test -e, which /bin/sh on solaris does not know.

Michael

15 years agobuild: fix bug #5677 - fix test_{shlibs,nss_modules,pam_modules} on Solaris
Michael Adam [Mon, 27 Oct 2008 11:59:11 +0000 (12:59 +0100)]
build: fix bug #5677 - fix test_{shlibs,nss_modules,pam_modules} on Solaris

and other systems where sh does not support "export FOO=bar"
by separating setting and exporting the variable.

Thanks to Yasuma Takeda <yasuma@osstech.co.jp> for the patch.

Michael

15 years agoError return is boolean false, not -1
Derrell Lipman [Fri, 24 Oct 2008 15:35:10 +0000 (11:35 -0400)]
Error return is boolean false, not -1

- There were a few places in SMBC_getatr() that returned -1 instead of a
  boolean.  -1 was intended to mean error, but that's what False/false is for,
  and the usages of this function assume that it returns a boolean false as
  the error condition.

- per Jelmer's request, use false vs. False in new code, even if not making
  changes globally.

Derrell

15 years agos3-samr-server: unify callback convention: _samr_UserSetInfo.
Günther Deschner [Thu, 23 Oct 2008 01:31:32 +0000 (03:31 +0200)]
s3-samr-server: unify callback convention: _samr_UserSetInfo.

Guenther
(cherry picked from commit aa301e82d0c44c6a733e8be2546d661ea56512ef)

15 years agos3-samr-server: unify callback convention: _samr_QueryDomainInfo.
Günther Deschner [Thu, 23 Oct 2008 01:30:58 +0000 (03:30 +0200)]
s3-samr-server: unify callback convention: _samr_QueryDomainInfo.

Guenther
(cherry picked from commit ac2c35bc379de83091644455dbeba0bea3e5ceb6)

15 years agos3-samr-server: fix return code in _samr_QueryDisplayInformation.
Günther Deschner [Thu, 23 Oct 2008 01:30:14 +0000 (03:30 +0200)]
s3-samr-server: fix return code in _samr_QueryDisplayInformation.

Guenther
(cherry picked from commit 30fa6c3ba19a8f816043405ba5d9eec84dd1c97b)

15 years agoWHATSNEW: Update changes since 3.2.4.
Karolin Seeger [Thu, 23 Oct 2008 10:04:02 +0000 (12:04 +0200)]
WHATSNEW: Update changes since 3.2.4.

Karolin

15 years agos3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on success.
Günther Deschner [Wed, 22 Oct 2008 23:42:27 +0000 (01:42 +0200)]
s3-samr-server: _samr_DeleteUser needs to wipe out the user_handle on success.

Guenther
(cherry picked from commit 8a0054c6d273049bea235803db25912f6cf03610)

15 years agos3-samr-server: fix access check in _samr_QuerySecurity().
Günther Deschner [Wed, 22 Oct 2008 21:16:19 +0000 (23:16 +0200)]
s3-samr-server: fix access check in _samr_QuerySecurity().

Guenther

15 years agoFix net rpc vampire, based on an *amazing* piece of debugging work by "Cooper S....
Jeremy Allison [Wed, 22 Oct 2008 20:18:58 +0000 (13:18 -0700)]
Fix net rpc vampire, based on an *amazing* piece of debugging work by "Cooper S. Blake" <the_analogkid@yahoo.com>.

"I believe I have found two bugs in the 3.2 code and one bug that
carried on to the 3.3 branch.  In the 3.2 code, everything is
located in the utils/net_rpc_samsync.c file.  What I believe is the
first problem is that fetch_database() is calling
samsync_fix_delta_array() with rid_crypt set to true, which means
the password hashes are unencrypted from the RID encryption.
However, I believe this call is redundant, and the corresponding
call for samdump has rid_crypt set to false.  So I think the
rid_crypt param should be false in fetch_database().

If you follow the code, it makes its way to sam_account_from_delta()
where the password hashes are decrypted a second time by calling
sam_pwd_hash().  I believe this is what is scrambling my passwords.

These methods were refactored somewhere in the 3.3 branch.  Now the
net_rpc_samsync.c class calls rpc_vampire_internals, which calls
libnet/libnet_samsync.c, which calls samsync_fix_delta_array() with
rid_crypt always set to false.  I think that's correct.  But the
second bug has carried through in the sam_account_from_delta()
function:

 208         if (memcmp(r->ntpassword.hash, zero_buf, 16) != 0) {
 209                 sam_pwd_hash(r->rid, r->ntpassword.hash, lm_passwd, 0);
 210                 pdb_set_lanman_passwd(account, lm_passwd, PDB_CHANGED);
 211         }
 212
 213         if (memcmp(r->lmpassword.hash, zero_buf, 16) != 0) {
 214                 sam_pwd_hash(r->rid, r->lmpassword.hash, nt_passwd, 0);
 215                 pdb_set_nt_passwd(account, nt_passwd, PDB_CHANGED);

If you look closely you'll see that the nt hash is going into the
lm_passwd variable and the decrypted value is being set in the lanman
hash, and the lanman hash is being decrypted and put into the nt hash
field.  So the LanMan and NT hashes look like they're being put in
the opposite fields."

Fix this by removing the rid_crypt parameter.
Jeremy.

15 years agoFix bug 5840: Segfault in "rpcclient lsaaddacctrights"
Volker Lendecke [Wed, 22 Oct 2008 12:26:05 +0000 (14:26 +0200)]
Fix bug 5840: Segfault in "rpcclient lsaaddacctrights"

15 years agoCope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
Jeremy Allison [Wed, 22 Oct 2008 00:06:53 +0000 (17:06 -0700)]
Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
Jeremy.

15 years agoMerge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
Jeremy Allison [Tue, 21 Oct 2008 19:20:00 +0000 (12:20 -0700)]
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test

15 years agoDelete the krb5 ccname variable from the PAM environment if set.
Andreas Schneider [Mon, 20 Oct 2008 15:35:42 +0000 (17:35 +0200)]
Delete the krb5 ccname variable from the PAM environment if set.

If winbind sets the KRB5CCNAME variable it should unset it when
the cache gets destroyed.

15 years agoWHATSNEW: Update changes.
Karolin Seeger [Tue, 21 Oct 2008 13:12:57 +0000 (15:12 +0200)]
WHATSNEW: Update changes.

Karolin

15 years agoRemove the requirement for ldap call made as root. Add in security
Jeremy Allison [Mon, 20 Oct 2008 23:53:05 +0000 (16:53 -0700)]
Remove the requirement for ldap call made as root. Add in security
checks for all SAMR calls.
Jeremy.

15 years agos3-samr-server: be consistent when reporting we do password complexity.
Günther Deschner [Mon, 20 Oct 2008 18:16:03 +0000 (20:16 +0200)]
s3-samr-server: be consistent when reporting we do password complexity.

Guenther

15 years agoUnify access checks for lsa server functions.
Jeremy Allison [Fri, 17 Oct 2008 22:25:58 +0000 (15:25 -0700)]
Unify access checks for lsa server functions.
Jeremy.

15 years agoCope with bad trans2mkdir requests from System i QNTC IBM SMB client.
Jeremy Allison [Fri, 17 Oct 2008 04:04:18 +0000 (21:04 -0700)]
Cope with bad trans2mkdir requests from System i QNTC IBM SMB client.
If total_data == 4 Windows doesn't care what values
are placed in that field, it just ignores them.
The System i QNTC IBM SMB client puts bad values here,
so ignore them.
Jeremy.

15 years agoUnify the logic in pull_ascii_base_talloc() and pull_ucs2_base_talloc().
Jeremy Allison [Thu, 16 Oct 2008 22:06:13 +0000 (15:06 -0700)]
Unify the logic in pull_ascii_base_talloc() and pull_ucs2_base_talloc().
Jeremy.

15 years agoFix bug 5826 - Directory/Filenames get truncated when 3.2.0 client acesses old server.
Jeremy Allison [Thu, 16 Oct 2008 18:57:51 +0000 (11:57 -0700)]
Fix bug 5826 - Directory/Filenames get truncated when 3.2.0 client acesses old server.
Karolin this is a show-stopper for 3.2.5.
There was some code in pull_ucs2_base_talloc() to cope with this case which
hadn't been added to pull_ascii_base_talloc(). The older Samba returns non
unicode names which is why you are seeing this codepath being executed.
Jeremy.

15 years agoDon't use debug level 1 to log a trivial message.
Jeremy Allison [Thu, 16 Oct 2008 01:08:07 +0000 (18:08 -0700)]
Don't use debug level 1 to log a trivial message.
Jeremy.

15 years agoWHATSNEW: Update changes since 3.2.4.
Karolin Seeger [Wed, 15 Oct 2008 18:33:59 +0000 (20:33 +0200)]
WHATSNEW: Update changes since 3.2.4.

Karolin

15 years agoWHATSNEW: Update changes since 3.2.4.
Karolin Seeger [Wed, 15 Oct 2008 18:23:24 +0000 (20:23 +0200)]
WHATSNEW: Update changes since 3.2.4.

Karolin

15 years agoAttempt to fix bug #5818 - "smbcacls: sorts ACEs improperly and loses inheritance...
Jeremy Allison [Tue, 14 Oct 2008 23:05:00 +0000 (16:05 -0700)]
Attempt to fix bug #5818 - "smbcacls: sorts ACEs improperly and loses inheritance", based on
a patch from Paul Fertser <fercerpav@gmail.com>. I also added the ability to get/set hex
and symbolic inheritance flag names on ACE flags. I'm still investigating the effects
of setting the "SEC_DESC_DACL_AUTO_INHERIT_REQ" flag as I don't yet see what effects
this is having on the ACE sent.
Jeremy.

15 years agoNote url explaining this code.
Jeremy Allison [Tue, 14 Oct 2008 22:40:44 +0000 (15:40 -0700)]
Note url explaining this code.
Jeremy.

15 years agoFix the "Premature end of data in tag" error when buiding the manpage, fix a typo...
Holger Hetterich [Tue, 14 Oct 2008 18:37:41 +0000 (11:37 -0700)]
Fix the "Premature end of data in tag" error when buiding the manpage, fix a typo in the text, add an example for anonymization usage.

15 years agoUpdate the manpage for vfs_smb_traffic_analyzer to include the anonymize_prefix option
Holger Hetterich [Mon, 13 Oct 2008 21:18:54 +0000 (14:18 -0700)]
Update the manpage for vfs_smb_traffic_analyzer to include the anonymize_prefix option

15 years agoEnable optional anonymization of user names,
Holger Hetterich [Mon, 13 Oct 2008 21:14:25 +0000 (14:14 -0700)]
Enable optional anonymization of user names,
if the configuration parameter anonymization_prefix is defined in
smb.conf, and use the prefix given there.

15 years agoFix bug 5691: SIGBUS on Solaris
Volker Lendecke [Tue, 7 Oct 2008 19:24:25 +0000 (21:24 +0200)]
Fix bug 5691: SIGBUS on Solaris

15 years agoFix the build
Volker Lendecke [Sun, 12 Oct 2008 08:41:29 +0000 (10:41 +0200)]
Fix the build

15 years agoNow it's working, back port the aync fix for parsing large cups printer lists.
Jeremy Allison [Sat, 11 Oct 2008 00:25:44 +0000 (17:25 -0700)]
Now it's working, back port the aync fix for parsing large cups printer lists.
Jeremy.

15 years agoMake use of ZERO_STRUCT (the first memset was actually wrong)
Volker Lendecke [Thu, 9 Oct 2008 15:22:59 +0000 (17:22 +0200)]
Make use of ZERO_STRUCT (the first memset was actually wrong)

15 years agomount.cifs: make return codes match the return codes for /bin/mount (try #3)
Jeff Layton [Thu, 9 Oct 2008 14:44:37 +0000 (10:44 -0400)]
mount.cifs: make return codes match the return codes for /bin/mount (try #3)

The manpage for /bin/mount specifies that the return code should be a
positive integer (actually, it's a bitfield). Clean up the return
codes from mount.cifs to make them match the expected return values
from /bin/mount. This necessary for proper integration with autofs.

This is the third attempt at this patch. The changes here are minor,
just changing some return's from main() into exit() calls for
consistency's sake.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
15 years agomount.cifs: have uppercase_string return success on NULL pointer
Jeff Layton [Thu, 9 Oct 2008 14:42:28 +0000 (10:42 -0400)]
mount.cifs: have uppercase_string return success on NULL pointer

We currently don't attempt to uppercase the device portion of the mount
string if there isn't a prefixpath. Fix that by making uppercase_string
return success without doing anything on a NULL pointer.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
15 years agoFix bug #5814 - Winbindd dumping core in a strange manner while doing "rescan_trusted...
Jeremy Allison [Wed, 8 Oct 2008 18:40:16 +0000 (11:40 -0700)]
Fix bug #5814 - Winbindd dumping core in a strange manner while doing "rescan_trusted_domain".
From analysis by hargagan <shargagan@novell.com> :
"The winbindd_child_died() is also getting called from process_loop() in case of
SIGCHLD signal. In this case it doesn't make the timeout_handler to NULL for
the first request. It then initiate a new request using
schedule_async_request() which installs a new timeout handler for the same
request. In such a case, for a badly unresponsive system both the timeout
handler can be called. For the first call the "private_data" will be cleared
and for another call the timeout handler will be detecting the double free. So,
for such a case as well, the winbindd_child_died() should make the
timeout_handler to NULL."
Jeremy.

15 years agoFixed build warning "passing arg from incompatible pointer type"
Tim Prouty [Tue, 7 Oct 2008 17:30:22 +0000 (10:30 -0700)]
Fixed build warning "passing arg from incompatible pointer type"

The fix explicitly makes the conversion from timeval to time_t using the
existing time utility functions.

Compiling modules/vfs_smb_traffic_analyzer.c
modules/vfs_smb_traffic_analyzer.c: In function `smb_traffic_analyzer_send_data':
modules/vfs_smb_traffic_analyzer.c:173: warning: passing arg 1 of `localtime' from incompatible pointer type

15 years agoFixed "declaration shadows global declaration" warnings.
Tim Prouty [Tue, 7 Oct 2008 17:13:51 +0000 (10:13 -0700)]
Fixed "declaration shadows global declaration" warnings.

The patch simply uses a more descriptive variable name for tcp_seq.

lib/socket_wrapper/socket_wrapper.c:753: warning: declaration of 'tcp_seq' shadows a global declaration
/usr/include/netinet/tcp.h:40: warning: shadowed declaration is here
lib/socket_wrapper/socket_wrapper.c: In function `swrap_marshall_packet':
lib/socket_wrapper/socket_wrapper.c:919: warning: declaration of 'tcp_seq' shadows a global declaration
/usr/include/netinet/tcp.h:40: warning: shadowed declaration is here

15 years agoIf name_to_fqdn fails, retry with the dns domain the DC gave us
Volker Lendecke [Mon, 6 Oct 2008 21:10:23 +0000 (14:10 -0700)]
If name_to_fqdn fails, retry with the dns domain the DC gave us

This is a workaround for the cases where you want to join under a netbios name
that is different from your hostname, i.e. a name that can not be found in
/etc/hosts or dns. In these cases, name_to_fqdn fails or gives invalid results.

15 years agoLog in the parent winbind log where a request is going
Volker Lendecke [Mon, 6 Oct 2008 21:10:10 +0000 (14:10 -0700)]
Log in the parent winbind log where a request is going

15 years agoRemove an unused variable
Volker Lendecke [Sun, 5 Oct 2008 21:34:58 +0000 (14:34 -0700)]
Remove an unused variable

15 years agoFix some missing error handlings
Volker Lendecke [Sun, 5 Oct 2008 21:34:01 +0000 (14:34 -0700)]
Fix some missing error handlings

15 years agoOS/X does not have rl_done in readline.h
Volker Lendecke [Sun, 5 Oct 2008 21:29:50 +0000 (14:29 -0700)]
OS/X does not have rl_done in readline.h

15 years agoFix an uninitialized variable warning
Volker Lendecke [Sun, 5 Oct 2008 21:28:33 +0000 (14:28 -0700)]
Fix an uninitialized variable warning

Not sure if we can ever not get domain and dns_domain, but gcc complained

15 years agoFix an unlikely memleak found by the IBM checker
Volker Lendecke [Sun, 5 Oct 2008 02:39:39 +0000 (19:39 -0700)]
Fix an unlikely memleak found by the IBM checker

15 years agoFix an uninitialized variable found by the IBM Checker
Volker Lendecke [Sun, 5 Oct 2008 02:38:42 +0000 (19:38 -0700)]
Fix an uninitialized variable found by the IBM Checker

15 years agoFix a potential NULL deref in line 258 found by the IBM checker
Volker Lendecke [Sun, 5 Oct 2008 02:38:04 +0000 (19:38 -0700)]
Fix a potential NULL deref in line 258 found by the IBM checker

15 years agoCorrectly fix smbclient to terminate on eof from server.
Jeremy Allison [Fri, 3 Oct 2008 21:56:30 +0000 (14:56 -0700)]
Correctly fix smbclient to terminate on eof from server.
Jeremy.

15 years agonet_dns: Make "lwinet ads dns register" honor the "interfaces" parameter.
Gerald (Jerry) Carter [Fri, 3 Oct 2008 15:51:54 +0000 (10:51 -0500)]
net_dns: Make "lwinet ads dns register" honor the "interfaces" parameter.

This is helpful on multihomed hosts that only require a subset
of IP addresses be registered with DNS.
(cherry picked from commit 17c9f8810598d8117befc896d12a597a52b0ac3b)

15 years agolibaddns: Use the same prerequisite for DDNS update as Windows XP.
Gerald (Jerry) Carter [Fri, 3 Oct 2008 15:51:21 +0000 (10:51 -0500)]
libaddns: Use the same prerequisite for DDNS update as Windows XP.

   Hostname, TYPE: CNAME, CLASS: NONE

This has to have been broken for ages.  I cannot see
how it would have worked in any environment.
(cherry picked from commit 6b6402bce318a48b0890ed6fc23ed5b30440927b)

15 years agoFix bug #5080. Access to cups-printers via samba broken with cups 1.3.4, Unsupported...
Jeremy Allison [Thu, 2 Oct 2008 21:02:20 +0000 (14:02 -0700)]
Fix bug #5080. Access to cups-printers via samba broken with cups 1.3.4, Unsupported character set.
Cups 1.3.4 expects utf8 to be used in all messages to/from the server. We may be using a
different character set so we need to use talloc utf8 push/pull functions in all communication.
Contains the !server fix already applied to 3.3.
Jeremy.

15 years agoFix bug 5805: don't close stdout
Derrell Lipman [Thu, 2 Oct 2008 13:17:49 +0000 (09:17 -0400)]
Fix bug 5805: don't close stdout

- When calling setup_logging multiple times, the code was closing the debug
  file descriptor before opening or assigning the new one.  We don't, however,
  want to close the debug file descriptor if it is stdout.

Derrell

15 years agoWhitespace cleanup.
Jeremy Allison [Wed, 1 Oct 2008 22:00:35 +0000 (15:00 -0700)]
Whitespace cleanup.
Jeremy.

15 years agoFix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.
Jeremy Allison [Wed, 1 Oct 2008 20:22:02 +0000 (13:22 -0700)]
Fix use of DLIST_REMOVE as spotted by Constantine Vetoshev <gepardcv@gmail.com>.
This API is unusual in that if used to remove a non-list head it nulls out
the next and prev pointers. This is what you want for debugging (don't want
an entry removed from the list to be still virtually linked into it) but
means there is no consistent idiom for use as the next and prev pointers
get trashed on removal from the list, meaning you must save them yourself.
You can use it one way when deleting everything via the head pointer, as
this preserves the next pointer, but you *must* use it another way when not
deleting everything via the head pointer. Fix all known uses of this (the main
one is in conn_free_internal() and would not free all the private data entries
for vfs modules. The other changes in web/statuspage.c and winbindd_util.c
are not strictly neccessary, as the head pointer is being used, but I've done
them for consistency. Long term we must revisit this as this API is too hard
to use correctly.
Jeremy.

15 years agoTurn the socket connections into a refcounted list - in the common case there'll...
Jeremy Allison [Wed, 1 Oct 2008 19:30:12 +0000 (12:30 -0700)]
Turn the socket connections into a refcounted list - in the common case there'll now only be one socket per smbd.
Changed the format of the wire data to (a) include a version number (V1) as the first element. (b) removed the
";)" at the end an replaced it with a "\n". Receiver can change back if needed, and now receiver can just log
"as-is" to a text file (making testing easier). Added my (C). Sorry Holger, but I've changed quite a bit now.
Jeremy.

15 years agoConvert to allocated strings. Use write_data(), not send as this doesn't correctly
Jeremy Allison [Tue, 30 Sep 2008 23:20:29 +0000 (16:20 -0700)]
Convert to allocated strings. Use write_data(), not send as this doesn't correctly
deal with EINTR. Jim and Holger please check this still works.
Jeremy.

15 years agoRestructure the module so it connects to the remote data sink
Jeremy Allison [Tue, 30 Sep 2008 22:09:49 +0000 (15:09 -0700)]
Restructure the module so it connects to the remote data sink
on connect, and closes the socket on client disconnect. This should
make it much more efficient. Store the remote fd in a private data
pointer off the handle. Finally we need to remove the fstrings and
convert to allocated buffer storage.
Jeremy.

15 years agoFix the make test problem Karolin reported. Now rename_open_files actually works...
Jeremy Allison [Tue, 30 Sep 2008 20:21:27 +0000 (13:21 -0700)]
Fix the make test problem Karolin reported. Now rename_open_files actually works correctly we must emit the change notify before we change the name, not before.
Jeremy.

15 years agore-added "winbind:ignore domains" patch
Andrew Tridgell [Mon, 29 Sep 2008 23:04:23 +0000 (16:04 -0700)]
re-added "winbind:ignore domains" patch

This option really is essential, as we discover again and again at
customer sites. Due to bugs in winbind some domains are toxic. When
you are installing at a site and a particular domain in a complex
setup causes winbind to segfault or hang then you need a way to
disable that domain and continue.

In an ideal world winbind could handle arbitrarily complex ADS
domains, but we are nowhere near that yet. If we ever get to that
stage then we won't need this option.

15 years agofixed segv on startup with trusted domains
Andrew Tridgell [Mon, 29 Sep 2008 18:24:00 +0000 (11:24 -0700)]
fixed segv on startup with trusted domains

With some setups, idmap_tdb2_allocate_id can be called before the
allocate backend is initialised, leading to a segv. This change
ensures that the db is opened in all paths that use it

15 years agoEnsure we null out fsp after a close in all paths.
Jeremy Allison [Mon, 29 Sep 2008 17:57:32 +0000 (10:57 -0700)]
Ensure we null out fsp after a close in all paths.
Jeremy.

15 years agoAvoid freeing fsp twice when opening new_file fails. (Debian #431696)
Jelmer Vernooij [Mon, 29 Sep 2008 17:53:36 +0000 (10:53 -0700)]
Avoid freeing fsp twice when opening new_file fails. (Debian #431696)
If opening new_file fails, fsp would still be set to the files_struct of
old_file.

15 years agoAdd an initial version of a manpage for the vfs_smb_traffic_analyzer module.
Holger Hetterich [Mon, 29 Sep 2008 12:34:36 +0000 (14:34 +0200)]
Add an initial version of a manpage for the vfs_smb_traffic_analyzer module.

15 years agoSecond part of the fix for bug #5790 - samba returns STATUS_OBJECT_NAME_NOT_FOUND...
Jeremy Allison [Sat, 27 Sep 2008 01:37:33 +0000 (18:37 -0700)]
Second part of the fix for bug #5790 - samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition call.
This was my fault. I use a singleton cache (positive and negative) to speed up pathname based qfileinfo/setfileinfo lookups for alternate fsp's open on the same path. I only invalidated the negative cache on adding a new file fsp, as I incorrectly imagined the new fsp was put at the *end* of the open files list. DLIST_ADD puts it at the start, meaning any subsequent open wasn't seen once the cache was set. Doh !
Jeremy.

15 years agoFix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de.
Jeremy Allison [Fri, 26 Sep 2008 22:18:18 +0000 (15:18 -0700)]
Fix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de.
We don't need to deny a DELETE open on a readonly file (I'm also adding a s4
torture test for this), the set_file_disposition call will return
NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set
on a readonly file (and we already do this).
Jeremy.

15 years agos3-srvsvc: fix _srvsvc_NetShareAdd segfault.
Günther Deschner [Thu, 25 Sep 2008 23:32:16 +0000 (01:32 +0200)]
s3-srvsvc: fix _srvsvc_NetShareAdd segfault.

parm_err is not a ref pointer.

Guenther
(cherry picked from commit 29942b7043c1a31ad4fb76d01ab19fd3dbf26f0a)

15 years agoUse IPv4/v6 independent calls. Change safe_strcpy/cat to strlcpy/cat (this
Jeremy Allison [Thu, 25 Sep 2008 18:56:10 +0000 (11:56 -0700)]
Use IPv4/v6 independent calls. Change safe_strcpy/cat to strlcpy/cat (this
needs changing to talloc_sprintf) and fix file descriptor resource leaks
in error paths. Jim and Holger please check !
Jeremy.

15 years agoFix the new vfs_smb_traffic_analyzer build for static links
Jim McDonough [Thu, 25 Sep 2008 00:47:03 +0000 (20:47 -0400)]
Fix the new vfs_smb_traffic_analyzer build for static links

15 years agoSMB traffic analyzer vfs module from Holger Hetterich <hhetter@novell.com>
Holger Hetterich [Wed, 24 Sep 2008 23:01:00 +0000 (19:01 -0400)]
SMB traffic analyzer vfs module from Holger Hetterich <hhetter@novell.com>

Used to gather data to feed to a database for live and historical
analysis of usage per user, per share, etc.

Helper apps to read the data still to come.  This one still needs to be
made ipv6 enabled (connection is made to the helper app).

15 years agoFix bug #5790 samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition.
Jeremy Allison [Wed, 24 Sep 2008 21:26:06 +0000 (14:26 -0700)]
Fix bug #5790 samba returns STATUS_OBJECT_NAME_NOT_FOUND on set file disposition.
We were checking that fd != -1 in file_find_di_XXX calls which is no longer
needed due to a change in internal semantics.
Jeremy.

15 years agoFix winbindd crash in an unusual failure mode. Bug #5737. Based on original patch...
Jeremy Allison [Tue, 23 Sep 2008 23:38:04 +0000 (16:38 -0700)]
Fix winbindd crash in an unusual failure mode. Bug #5737. Based on original patch from shargagan@novell.com
Jeremy.

15 years agoFix bug #5783 FindFirst fails where search pattern == mangled filename.
Jeremy Allison [Tue, 23 Sep 2008 22:04:18 +0000 (15:04 -0700)]
Fix bug #5783 FindFirst fails where search pattern == mangled filename.
That was an old and subtle bug.
Jeremy.

15 years agoAttempt to fix bug 5778
Volker Lendecke [Sun, 21 Sep 2008 18:39:17 +0000 (20:39 +0200)]
Attempt to fix bug 5778

Jeff, Steve, please check!
(cherry picked from commit 110756cc7bcaed5a9d6aa58f3b3fe4481f8d1f31)

15 years agobuild: don't install the cifs.upcall binary twice.
Günther Deschner [Fri, 5 Sep 2008 12:01:45 +0000 (14:01 +0200)]
build: don't install the cifs.upcall binary twice.

Guenther
(cherry picked from commit 1f44b4aaa5f700827ee2ab272ae4b59e559b094b)
(cherry picked from commit 020c03bff844ef976dd786a755c4d682bf161a3d)
(cherry picked from commit 5a9a190a5588b0cf938bc5c9659b7704d18cd4a3)

15 years agobuild-docs: Add 'make clean'.
Karolin Seeger [Thu, 18 Sep 2008 13:52:06 +0000 (15:52 +0200)]
build-docs: Add 'make clean'.

Karolin
(cherry picked from commit cf40fb97239ed9a11e5750fde6e078233e567bba)
(cherry picked from commit 6e1d92e3b324a0759486f914a0e4b32be1142aee)

15 years agoWHATSNEW: Start WHATSNEW for 3.2.5.
Karolin Seeger [Thu, 18 Sep 2008 13:58:02 +0000 (15:58 +0200)]
WHATSNEW: Start WHATSNEW for 3.2.5.

Karolin

15 years agoVERSION: Raise version number up to 3.2.5.
Karolin Seeger [Thu, 18 Sep 2008 13:56:02 +0000 (15:56 +0200)]
VERSION: Raise version number up to 3.2.5.

Karolin

15 years agofind_missing_manpages.pl: Adapt script to changed directory structure.
Karolin Seeger [Wed, 17 Sep 2008 06:48:19 +0000 (08:48 +0200)]
find_missing_manpages.pl: Adapt script to changed directory structure.

Karolin
(cherry picked from commit b6b7aa023b62ab8994d13cb91d5185204c1500b2)

15 years agoWHATSNEW: Improve description of Simo's bug fix.
Karolin Seeger [Thu, 18 Sep 2008 06:46:54 +0000 (08:46 +0200)]
WHATSNEW: Improve description of Simo's bug fix.

Karolin

15 years agoEnsure all pointers are initialized. Without this we can crash when looking up a...
Jeremy Allison [Wed, 17 Sep 2008 18:59:18 +0000 (11:59 -0700)]
Ensure all pointers are initialized. Without this we can crash when looking up a non-existant uid.
Jeremy.

15 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Wed, 17 Sep 2008 13:32:51 +0000 (15:32 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin

15 years agoidmap_ad: Fix a segfault when calling nss_get_info() with a NULL ads structure.
Gerald W. Carter [Mon, 15 Sep 2008 17:38:36 +0000 (12:38 -0500)]
idmap_ad: Fix a segfault when calling nss_get_info() with a NULL ads structure.

15 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Tue, 16 Sep 2008 07:54:12 +0000 (09:54 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin

15 years agoman cifs.upcall: Fix typo, wrap lines.
Karolin Seeger [Mon, 15 Sep 2008 14:33:16 +0000 (16:33 +0200)]
man cifs.upcall: Fix typo, wrap lines.

Karolin
(cherry picked from commit c4f361a17f51e4897ac2faafc65ebc8349e19001)

15 years agoFix aio on FreeBSD.
Timur [Tue, 16 Sep 2008 01:43:26 +0000 (18:43 -0700)]
Fix aio on FreeBSD.

15 years agoFix display of POSIX ACLs.
Timur [Tue, 16 Sep 2008 01:24:58 +0000 (18:24 -0700)]
Fix display of POSIX ACLs.

15 years agoFix cut and paste error in quota code.
Timur [Tue, 16 Sep 2008 01:19:01 +0000 (18:19 -0700)]
Fix cut and paste error in quota code.

15 years agoSimple fix for warning:
Steven Danneman [Tue, 16 Sep 2008 00:55:22 +0000 (17:55 -0700)]
Simple fix for warning:

Compiling utils/sharesec.c
utils/sharesec.c: In function `change_share_sec':
utils/sharesec.c:404: warning: 'sd' might be used uninitialized in this function

15 years agoFix build warning on FreeBSD
Steven Danneman [Mon, 15 Sep 2008 23:28:30 +0000 (16:28 -0700)]
Fix build warning on FreeBSD

Fix for the following build warning:

Compiling torture/cmd_vfs.c
torture/cmd_vfs.c: In function `cmd_open':
torture/cmd_vfs.c:275: warning: unsigned int format, different type arg (arg 3)
torture/cmd_vfs.c: In function `cmd_mknod':
torture/cmd_vfs.c:992: warning: unsigned int format, different type arg (arg 3)

sccanf had mismatched types for mode_t between formating parameter and var args.

15 years agoFix bug 5761 "open of mangled directory name results in 'is a stream name'"
Jeremy Allison [Mon, 15 Sep 2008 21:13:23 +0000 (14:13 -0700)]
Fix bug 5761 "open of mangled directory name results in 'is a stream name'"
reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>.
Jeremy.

15 years agoWHATSNEW: Update changes since 3.2.3.
Karolin Seeger [Mon, 15 Sep 2008 09:08:06 +0000 (11:08 +0200)]
WHATSNEW: Update changes since 3.2.3.

Karolin

15 years agomount.cifs: make local versions of strlcat and strlcpy static
Jeff Layton [Sun, 14 Sep 2008 12:37:45 +0000 (08:37 -0400)]
mount.cifs: make local versions of strlcat and strlcpy static

...to silence -Wmissing-prototypes

Signed-off-by: Jeff Layton <jlayton@redhat.com>
15 years agocifs.upcall: make most functions static and silence compiler warnings
Jeff Layton [Sun, 14 Sep 2008 12:37:45 +0000 (08:37 -0400)]
cifs.upcall: make most functions static and silence compiler warnings

...to silence -Wmissing-prototypes and some uninit'ed variable
warnings. Thanks to GD for the extra-paranoid compiler flags.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
15 years agoModify a comment to make things clearer.
Jeremy Allison [Fri, 12 Sep 2008 22:04:11 +0000 (15:04 -0700)]
Modify a comment to make things clearer.
Jeremy.

15 years agocifs.upcall: move default install location to EPREFIX/sbin
Jeff Layton [Fri, 12 Sep 2008 17:37:13 +0000 (13:37 -0400)]
cifs.upcall: move default install location to EPREFIX/sbin

cifs.upcall links to libraries that live under /usr, so installing it
in /sbin doesn't seem appropriate. Move it to EPREFIX/sbin instead
(i.e. /usr/sbin).

Signed-off-by: Jeff Layton <jlayton@redhat.com>
15 years agocifs.upcall: enable building by default on linux
Jeff Layton [Fri, 12 Sep 2008 17:37:13 +0000 (13:37 -0400)]
cifs.upcall: enable building by default on linux

When building on linux, default to building cifs.upcall. Throw a
warning if ADS support is disabled or keyutils isn't installed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
15 years agoUse the given name, not the absolute pathname, when printing out ACL info.
Jeremy Allison [Fri, 12 Sep 2008 00:31:36 +0000 (17:31 -0700)]
Use the given name, not the absolute pathname, when printing out ACL info.
Make this match the non-ACL case.
Jeremy.