1
diff --git a/binfilter/bf_sfx2/source/appl/sfx2_appinit.cxx b/binfilter/bf_sfx2/source/appl/sfx2_appinit.cxx
2
index 6b50346..2a352b6 100644
3
--- binfilter/bf_sfx2/source/appl/sfx2_appinit.cxx
4
+++ binfilter/bf_sfx2/source/appl/sfx2_appinit.cxx
6
#ifndef _RTL_USTRBUF_HXX_
7
#include <rtl/ustrbuf.hxx>
9
-#ifndef _VOS_SECURITY_HXX_
10
-#include <vos/security.hxx>
11
+#ifndef _OSL_SECURITY_HXX_
12
+#include <osl/security.hxx>
14
#ifndef _UCBHELPER_CONFIGURATIONKEYS_HXX_
15
#include <ucbhelper/configurationkeys.hxx>
16
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
17
index c78329f..b08b8de 100644
18
--- desktop/source/app/app.cxx
19
+++ desktop/source/app/app.cxx
21
#ifndef _OSL_MUTEX_HXX_
22
#include <osl/mutex.hxx>
24
-#ifndef _VOS_SECURITY_HXX_
25
-#include <vos/security.hxx>
26
+#ifndef _OSL_SECURITY_HXX_
27
+#include <osl/security.hxx>
30
#include <rtl/ref.hxx>
31
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
32
index a9094f4..bef1689 100644
33
--- desktop/source/app/appinit.cxx
34
+++ desktop/source/app/appinit.cxx
36
#include <svtools/internaloptions.hxx>
39
-#include <vos/security.hxx>
40
+#include <osl/security.hxx>
43
#define DEFINE_CONST_OUSTRING(CONSTASCII) OUString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
45
#define DESKTOP_TEMPDIRNAME "soffice.tmp"
49
using namespace desktop;
50
using namespace ::com::sun::star::uno;
51
using namespace ::com::sun::star::lang;
52
@@ -169,7 +168,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
56
- vos::OSecurity().getUserIdent(aPipe);
57
+ osl::Security().getUserIdent(aPipe);
59
rtl::OUStringBuffer aPortal;
60
if (rPortalConnect.getLength() != 0)
61
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
62
index 95efc2c..e621e73 100644
63
--- desktop/source/app/officeipcthread.cxx
64
+++ desktop/source/app/officeipcthread.cxx
65
@@ -111,7 +111,7 @@ namespace desktop
66
String GetURL_Impl( const String& rName );
68
OfficeIPCThread* OfficeIPCThread::pGlobalOfficeIPCThread = 0;
69
-namespace { struct Security : public rtl::Static<OSecurity, Security> {}; }
70
+namespace { struct Security : public rtl::Static<osl::Security, Security> {}; }
71
::osl::Mutex* OfficeIPCThread::pOfficeIPCThreadMutex = 0;
74
@@ -375,7 +375,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
75
PipeMode nPipeMode = PIPEMODE_DONTKNOW;
78
- OSecurity &rSecurity = Security::get();
79
+ osl::Security &rSecurity = Security::get();
81
if ( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity ))
83
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
84
index ec6ed08..65cc8b5 100644
85
--- desktop/source/app/officeipcthread.hxx
86
+++ desktop/source/app/officeipcthread.hxx
88
#ifndef _VOS_PIPE_HXX_
89
#include <vos/pipe.hxx>
91
-#ifndef _VOS_SECURITY_HXX_
92
-#include <vos/security.hxx>
93
+#ifndef _OSL_SECURITY_HXX_
94
+#include <osl/security.hxx>
97
#include <osl/thread.hxx>
98
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
99
index fb952b1..54578f3 100644
100
--- desktop/source/app/userinstall.cxx
101
+++ desktop/source/app/userinstall.cxx
103
#include <osl/diagnose.h>
106
-#ifndef _VOS_SECURITY_HXX_
107
-#include <vos/security.hxx>
108
+#ifndef _OSL_SECURITY_HXX_
109
+#include <osl/security.hxx>
111
#ifndef _RTL_REF_HXX_
112
#include <rtl/ref.hxx>
113
diff --git a/sal/typesconfig/core b/sal/typesconfig/core
114
index 97fe99e..e8e58ab 100644
115
Binary files a/sal/typesconfig/core and b/sal/typesconfig/core differ
116
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
117
index 94de398..ed8e57f 100644
118
--- sfx2/inc/pch/precompiled_sfx2.hxx
119
+++ sfx2/inc/pch/precompiled_sfx2.hxx
121
#include "osl/diagnose.h"
122
#include "osl/module.hxx"
123
#include "osl/mutex.hxx"
124
-#include "vos/security.hxx"
125
+#include "osl/security.hxx"
126
#include "vos/socket.hxx"
127
#include "osl/thread.hxx"
129
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
130
index 5f4455f..57231b3 100644
131
--- sfx2/source/appl/appinit.cxx
132
+++ sfx2/source/appl/appinit.cxx
134
#ifndef _RTL_USTRBUF_HXX_
135
#include <rtl/ustrbuf.hxx>
137
-#ifndef _VOS_SECURITY_HXX_
138
-#include <vos/security.hxx>
139
+#ifndef _OSL_SECURITY_HXX_
140
+#include <osl/security.hxx>
142
#ifndef _UCBHELPER_CONFIGURATIONKEYS_HXX_
143
#include <ucbhelper/configurationkeys.hxx>
144
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
145
index 5b4f7cf..6974d12 100644
146
--- sfx2/source/dialog/filedlghelper.cxx
147
+++ sfx2/source/dialog/filedlghelper.cxx
149
#ifndef _OSL_MUTEX_HXX_
150
#include <osl/mutex.hxx>
152
-#ifndef _VOS_SECURITY_HXX_
153
-#include <vos/security.hxx>
154
+#ifndef _OSL_SECURITY_HXX_
155
+#include <osl/security.hxx>
158
#ifndef _SV_CVTGRF_HXX
159
@@ -2568,7 +2568,7 @@ void FileDialogHelper::SetDisplayDirectory( const String& _rPath )
160
if ( sFolder.getLength() == 0 )
162
// _rPath is not a valid path -> fallback to home directory
163
- vos::OSecurity aSecurity;
164
+ osl::Security aSecurity;
165
aSecurity.getHomeDir( sFolder );
167
mpImp->displayFolder( sFolder );
168
diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx
169
index 8324445..f8e7c08 100644
170
--- svtools/inc/pch/precompiled_svtools.hxx
171
+++ svtools/inc/pch/precompiled_svtools.hxx
173
#include <osl/mutex.hxx>
174
#include <rtl/ref.hxx>
175
#include <salhelper/simplereferenceobject.hxx>
176
-#include <vos/security.hxx>
177
+#include <osl/security.hxx>
178
#include <osl/thread.hxx>
179
#include <vos/timer.hxx>
181
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
182
index d748d7b..002c782 100644
183
--- svtools/source/dialogs/filedlg2.cxx
184
+++ svtools/source/dialogs/filedlg2.cxx
186
#include <vcl/msgbox.hxx>
189
-#ifndef _VOS_SECURITY_HXX_
190
-#include <vos/security.hxx>
191
+#ifndef _OSL_SECURITY_HXX_
192
+#include <osl/security.hxx>
195
#ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_
196
@@ -373,7 +373,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
197
if ( pBtn == pHomeBtn )
199
::rtl::OUString aHomeDir;
200
- vos::OSecurity aSecurity;
201
+ osl::Security aSecurity;
202
if ( aSecurity.getHomeDir( aHomeDir ) )
204
DirEntry aFile ( aHomeDir );
205
diff --git a/vos/inc/vos/pipe.hxx b/vos/inc/vos/pipe.hxx
206
index 7a1f8ac..3067a42 100644
207
--- vos/inc/vos/pipe.hxx
208
+++ vos/inc/vos/pipe.hxx
210
#ifndef _VOS_REFOBJ_HXX_
211
# include <vos/refobj.hxx>
213
-#ifndef _VOS_SECURITY_HXX_
214
-# include <vos/security.hxx>
215
+#ifndef _OSL_SECURITY_HXX_
216
+# include <osl/security.hxx>
218
#ifndef _RTL_USTRING_HXX_
219
# include <rtl/ustring.hxx>
220
@@ -123,7 +123,7 @@ public:
223
OPipe(const ::rtl::OUString& strName, TPipeOption Options,
224
- const vos::OSecurity& rSecurity);
225
+ const osl::Security& rSecurity);
227
/** Copy constructor.
229
@@ -154,7 +154,7 @@ public:
230
@return True if socket was successfully created.
232
sal_Bool SAL_CALL create(const ::rtl::OUString& strName, TPipeOption Options,
233
- const vos::OSecurity& rSecurity);
234
+ const osl::Security& rSecurity);
236
/** Assignment operator. If pipe was already created, the old one will
238
diff --git a/vos/inc/vos/process.hxx b/vos/inc/vos/process.hxx
239
index d8db5b6..2440c5a 100644
240
--- vos/inc/vos/process.hxx
241
+++ vos/inc/vos/process.hxx
243
#ifndef _RTL_USTRING_HXX_
244
# include <rtl/ustring.hxx>
246
-#ifndef _VOS_SECURITY_HXX_
247
-# include <vos/security.hxx>
248
+#ifndef _OSL_SECURITY_HXX_
249
+# include <osl/security.hxx>
251
#ifndef _VOS_OBJECT_HXX_
252
# include <vos/object.hxx>
253
@@ -211,7 +211,7 @@ public:
254
@see OStartupInfo::acceptIOResource
256
TProcessError SAL_CALL execute(TProcessOption Options,
257
- const OSecurity &Security,
258
+ const osl::Security &Security,
259
const OArgumentList& aArgumentList = OArgumentList(),
260
const OEnvironment& aEnvironment = OEnvironment()
262
diff --git a/vos/inc/vos/security.hxx b/vos/inc/vos/security.hxx
263
deleted file mode 100644
264
index 8f41fd9..0000000
265
--- vos/inc/vos/security.hxx
268
-/*************************************************************************
270
- * OpenOffice.org - a multi-platform office productivity suite
272
- * $RCSfile: security.hxx,v $
276
- * last change: $Author: vg $ $Date: 2006/06/02 12:39:33 $
278
- * The Contents of this file are made available subject to
279
- * the terms of GNU Lesser General Public License Version 2.1.
282
- * GNU Lesser General Public License Version 2.1
283
- * =============================================
284
- * Copyright 2005 by Sun Microsystems, Inc.
285
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
287
- * This library is free software; you can redistribute it and/or
288
- * modify it under the terms of the GNU Lesser General Public
289
- * License version 2.1, as published by the Free Software Foundation.
291
- * This library is distributed in the hope that it will be useful,
292
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
293
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
294
- * Lesser General Public License for more details.
296
- * You should have received a copy of the GNU Lesser General Public
297
- * License along with this library; if not, write to the Free Software
298
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
299
- * MA 02111-1307 USA
301
- ************************************************************************/
303
-#ifndef _VOS_SECURITY_HXX_
304
-#define _VOS_SECURITY_HXX_
306
-#ifndef _VOS_OBJECT_HXX_
307
-# include <vos/object.hxx>
309
-#ifndef _RTL_USTRING_HXX_
310
-# include <rtl/ustring.hxx>
312
-#ifndef _OSL_SECURITY_H_
313
-# include <osl/security.h>
319
-/** capsulate security informations for one user.
320
- A object of this class is used to execute a process with the rights an
321
- security options of a scecified user.
322
- @see OProcess::executeProcess
323
- @author Bernd Hofner
327
-class OSecurity : public OObject
329
- VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OSecurity, vos));
335
- virtual ~OSecurity();
336
- /** get the security information for one user.
337
- The underlying operating system is asked for this information.
338
- @param strName [in] denotes the name of the user
339
- @param strPasswd [in] denotes the password of this user
340
- @return True, if the specified user is known by the underlying operating system,
343
- sal_Bool SAL_CALL logonUser(const ::rtl::OUString& strName,
344
- const ::rtl::OUString& strPasswd);
345
- /** get the security information for one user.
346
- This method will try to login the user at the denoted file server.
347
- If a network resource named \\server\username exists and this resource
348
- could be connected by this user, the methos will return true and getHomeDir
349
- will return \\server\username.
350
- @param strName [in] denotes the name of the user
351
- @param strPasswd [in] denotes the password of this user
352
- @return True, if the specified user is known by file server and the
353
- could be connected, otherwise False
355
- sal_Bool SAL_CALL logonUser(const ::rtl::OUString& strName,
356
- const ::rtl::OUString& strPasswd,
357
- const ::rtl::OUString& strFileServer);
359
- /** get the ident of the logged in user.
360
- @param strName [out] is the buffer which returns the name
361
- @param max [in] is the size of this buffer
362
- @return True, if any user is successfuly logged in, otherwise False
364
- sal_Bool SAL_CALL getUserIdent(::rtl::OUString& strIdent) const;
366
- /** get the name of the logged in user.
367
- @param strName [out] is the buffer which returns the name
368
- @param max [in] is the size of this buffer
369
- @return True, if any user is successfuly logged in, otherwise False
371
- sal_Bool SAL_CALL getUserName(::rtl::OUString& strName) const;
373
- /** get the home directory of the logged in user.
374
- @param strDirectory [out] is the buffer which returns the directory name
375
- @param max [in] is the size of this buffer
376
- @return True, if any user is successfuly logged in, otherwise False
378
- sal_Bool SAL_CALL getHomeDir(::rtl::OUString& strDirectory) const;
380
- /** get the directory for configuration data of the logged in user.
381
- @param strDirectory [out] is the buffer which returns the directory name
382
- @param max [in] is the size of this buffer
383
- @return True, if any user is successfuly logged in, otherwise False
385
- sal_Bool SAL_CALL getConfigDir(::rtl::OUString& strDirectory) const;
387
- /** Query if the user who is logged inhas administrator rigths.
388
- @return True, if the user has administrator rights, otherwise false.
390
- sal_Bool SAL_CALL isAdministrator() const;
392
- virtual SAL_CALL operator oslSecurity() const;
396
- oslSecurity m_oslSecurity;
401
-#endif // _VOS_SECURITY_HXX_
403
diff --git a/vos/source/makefile.mk b/vos/source/makefile.mk
404
index 61584e7..0d2ae51 100644
405
--- vos/source/makefile.mk
406
+++ vos/source/makefile.mk
407
@@ -53,7 +53,6 @@ SLOFILES= \
410
$(SLO)$/process.obj \
411
- $(SLO)$/security.obj \
415
@@ -66,7 +65,6 @@ OBJFILES= \
418
$(OBJ)$/process.obj \
419
- $(OBJ)$/security.obj \
423
diff --git a/vos/source/pipe.cxx b/vos/source/pipe.cxx
424
index d280fae..1669b80 100644
425
--- vos/source/pipe.cxx
426
+++ vos/source/pipe.cxx
427
@@ -76,12 +76,12 @@ OPipe::OPipe( const rtl::OUString& strName, TPipeOption Options)
429
OPipe::OPipe( const rtl::OUString& strName,
431
- const OSecurity& rSecurity)
432
+ const osl::Security& rSecurity)
435
new PipeRef(osl_createPipe(strName.pData,
436
(oslPipeOptions)Options,
437
- (oslSecurity)rSecurity));
438
+ rSecurity.getHandle()));
440
OSL_POSTCOND(m_pPipeRef != 0, "OPipe(): new failed.\n");
441
OSL_POSTCOND((*m_pPipeRef)(), "OPipe(): creation of pipe failed!\n");
442
@@ -146,7 +146,7 @@ sal_Bool OPipe::create( const rtl::OUString& strName, TPipeOption Options )
443
/*****************************************************************************/
444
sal_Bool OPipe::create( const rtl::OUString& strName,
446
- const vos::OSecurity& rSecurity )
447
+ const osl::Security& rSecurity )
449
// if this was a valid pipe, decrease reference
450
if ((m_pPipeRef) && (m_pPipeRef->release() == 0))
451
@@ -159,7 +159,7 @@ sal_Bool OPipe::create( const rtl::OUString& strName,
453
new PipeRef(osl_createPipe(strName.pData,
454
(oslPipeOptions)Options,
455
- (oslSecurity)rSecurity));
456
+ rSecurity.getHandle()));
458
OSL_POSTCOND(m_pPipeRef != 0, "OPipe(): new failed.\n");
460
diff --git a/vos/source/process.cxx b/vos/source/process.cxx
461
index ac6a509..3872bbc 100644
462
--- vos/source/process.cxx
463
+++ vos/source/process.cxx
464
@@ -296,7 +296,7 @@ OProcess::TProcessError OProcess::execute(TProcessOption Options,
467
OProcess::TProcessError OProcess::execute( TProcessOption Options,
468
- const OSecurity &Security,
469
+ const osl::Security &Security,
470
const OArgumentList& aArgumentList,
471
const OEnvironment& aEnvironment )
473
@@ -304,7 +304,7 @@ OProcess::TProcessError OProcess::execute( TProcessOption Options,
474
aArgumentList.m_aVec,
475
aArgumentList.n_Args,
478
+ Security.getHandle(),
479
m_strDirectory.pData,
482
diff --git a/vos/source/security.cxx b/vos/source/security.cxx
483
deleted file mode 100644
484
index cb33330..0000000
485
--- vos/source/security.cxx
488
-/*************************************************************************
490
- * OpenOffice.org - a multi-platform office productivity suite
492
- * $RCSfile: security.cxx,v $
496
- * last change: $Author: vg $ $Date: 2006/06/02 12:43:47 $
498
- * The Contents of this file are made available subject to
499
- * the terms of GNU Lesser General Public License Version 2.1.
502
- * GNU Lesser General Public License Version 2.1
503
- * =============================================
504
- * Copyright 2005 by Sun Microsystems, Inc.
505
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
507
- * This library is free software; you can redistribute it and/or
508
- * modify it under the terms of the GNU Lesser General Public
509
- * License version 2.1, as published by the Free Software Foundation.
511
- * This library is distributed in the hope that it will be useful,
512
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
513
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
514
- * Lesser General Public License for more details.
516
- * You should have received a copy of the GNU Lesser General Public
517
- * License along with this library; if not, write to the Free Software
518
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
519
- * MA 02111-1307 USA
521
- ************************************************************************/
524
-#include <vos/security.hxx>
525
-#include <osl/diagnose.h>
527
-using namespace vos;
529
-/////////////////////////////////////////////////////////////////////////////
530
-// Object super class
532
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSecurity, vos), VOS_NAMESPACE(OSecurity, vos), VOS_NAMESPACE(OObject, vos), 0);
534
-OSecurity::OSecurity()
536
- m_oslSecurity = osl_getCurrentSecurity();
539
-OSecurity::~OSecurity()
541
- osl_freeSecurityHandle(m_oslSecurity);
544
-sal_Bool OSecurity::logonUser(const rtl::OUString& strName,
545
- const rtl::OUString& strPasswd)
547
- osl_freeSecurityHandle(m_oslSecurity);
549
- m_oslSecurity = NULL;
551
- return (osl_loginUser( strName.pData, strPasswd.pData, &m_oslSecurity)
552
- == osl_Security_E_None);
556
-sal_Bool OSecurity::logonUser( const rtl::OUString& strName,
557
- const rtl::OUString& strPasswd,
558
- const rtl::OUString& strFileServer )
560
- osl_freeSecurityHandle(m_oslSecurity);
562
- m_oslSecurity = NULL;
564
- return (osl_loginUserOnFileServer(strName.pData, strPasswd.pData, strFileServer.pData, &m_oslSecurity)
565
- == osl_Security_E_None);
569
-sal_Bool OSecurity::getUserIdent( rtl::OUString& strIdent) const
571
- OSL_ASSERT(m_oslSecurity);
573
- return osl_getUserIdent( m_oslSecurity, &strIdent.pData );
577
-sal_Bool OSecurity::getUserName( rtl::OUString& strName ) const
579
- OSL_ASSERT(m_oslSecurity);
581
- return osl_getUserName( m_oslSecurity, &strName.pData );
585
-sal_Bool OSecurity::getHomeDir( rtl::OUString& strDirectory) const
587
- OSL_ASSERT(m_oslSecurity);
589
- return osl_getHomeDir(m_oslSecurity, &strDirectory.pData );
593
-sal_Bool OSecurity::getConfigDir( rtl::OUString& strDirectory ) const
595
- OSL_ASSERT(m_oslSecurity);
597
- return osl_getConfigDir( m_oslSecurity, &strDirectory.pData );
600
-sal_Bool OSecurity::isAdministrator() const
602
- OSL_ASSERT(m_oslSecurity);
604
- return osl_isAdministrator(m_oslSecurity);
607
-OSecurity::operator oslSecurity() const
609
- return m_oslSecurity;