summaryrefslogtreecommitdiff
path: root/source/locking
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-09-26 12:39:45 +0000
committerAndrew Tridgell <tridge@samba.org>1997-09-26 12:39:45 +0000
commite8dd34b0d3ba704deff696c1683297536a494893 (patch)
treea53f2b1b66285c18b7696df87e0b1e3f520006bb /source/locking
parentc701db19e14d1b53103acbb8f7abe4c8bc2c3614 (diff)
downloadsamba-e8dd34b0d3ba704deff696c1683297536a494893.tar.gz
This commit fixes the security hole due to buffer overflows.
The main fix is just a couple of lines long, but I have now also put precautionary checks on a large number of other places in the code where unchecked string copies were being performed. An exploit via one of these copies is unlikely, but is is better to be safe. I also added a routine to log possible exploit attempts using the code that was posted for obtaining root access on a Samba server.
Diffstat (limited to 'source/locking')
-rw-r--r--source/locking/locking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/locking/locking.c b/source/locking/locking.c
index 760d21a05d8..c2a06cac75c 100644
--- a/source/locking/locking.c
+++ b/source/locking/locking.c
@@ -108,7 +108,7 @@ BOOL start_share_mode_mgmt(void)
{
pstring shmem_file_name;
- strcpy(shmem_file_name,lp_lockdir());
+ pstrcpy(shmem_file_name,lp_lockdir());
if (!directory_exist(shmem_file_name,NULL))
mkdir(shmem_file_name,0755);
trim_string(shmem_file_name,"","/");