summaryrefslogtreecommitdiff
path: root/src/common/include/privilege_db.h
blob: 17cb80411100ea1c41e8191cd53ea70a9568c4fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
/*
 * security-manager, database access
 *
 * Copyright (c) 2000 - 2018 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Contact: Rafal Krypa <r.krypa@samsung.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

/*
 * @file        privilege_db.h
 * @author      Krzysztof Sasiak <k.sasiak@samsung.com>
 * @author      Rafal Krypa <r.krypa@samsung.com>
 * @author      Zofia Abramowska <z.abramowska@samsung.com>
 * @author      Aleksander Zdyb <a.zdyb@samsung.com>
 * @version     1.0
 * @brief       This file contains declaration of the API to privilges database.
 */

#pragma once

#include <array>
#include <cstdio>
#include <list>
#include <utility>
#include <map>
#include <stdbool.h>
#include <string>
#include <vector>

#include <dpl/db/sql_connection.h>
#include <utils.h>
#include "security-manager-types.h"

#include "pkg-info.h"

namespace SecurityManager {

enum class StmtType : uint8_t {
    EAddApplication,
    ERemoveApplication,
    EPkgNameExists,
    EAppNameExists,
    EGetAppPkgName,
    EGetAppVersion,
    EGetPathSharedCount,
    EGetTargetPathSharedCount,
    EGetOwnerTargetSharedCount,
    EAddPrivatePathSharing,
    ERemovePrivatePathSharing,
    EGetAllSharedPaths,
    EGetSharingForOwner,
    EGetSharingForTarget,
    ESquashSharing,
    EClearSharing,
    EClearPrivatePaths,
    EGetUserApps,
    EGetUserAppsFromPkg,
    EGetUserPkgs,
    EGetAllPackages,
    EGetAppsInPkg,
    EGetGroupsRelatedPrivileges,
    EGetPkgAuthorId,
    EAuthorIdExists,
    EGetAuthorIdByName,
    ESetPackageSharedRO,
    EIsPackageSharedRO,
    EIsPackageHybrid,
    EGetPackagesInfo,
    EAddAppDefinedPrivilege,
    EAddClientPrivilege,
    ERemoveAppDefinedPrivileges,
    ERemoveClientPrivileges,
    EGetAppDefinedPrivileges,
    EGetAppPkgLicenseForAppDefinedPrivilege,
    EGetLicenseForClientPrivilegeAndApp,
    EGetLicenseForClientPrivilegeAndPkg,
    EIsUserPkgInstalled,
};
enum : uint8_t { StmtTypeCount = underlying(StmtType::EIsUserPkgInstalled) + 1 };

// privilege, app_defined_privilege_type, license
typedef std::tuple<std::string, int, std::string> AppDefinedPrivilege;
typedef std::vector<AppDefinedPrivilege> AppDefinedPrivilegesVector;

class PrivilegeDb {
    /**
     * PrivilegeDb database class
     */

private:
    /**
     * Wrapper for prepared statement, it will reset statement at destruction.
     */
    class StatementWrapper {
    public:
        StatementWrapper(DB::SqlConnection::DataCommandAutoPtr &ref);
        ~StatementWrapper();
        DB::SqlConnection::DataCommand* operator->();
    private:
        DB::SqlConnection::DataCommandAutoPtr &m_ref;
    };

    SecurityManager::DB::SqlConnection mSqlConnection;

    /**
     * Container for initialized DataCommands, prepared for binding.
     *
     * Destroyed before mSqlConnection.
     */
    std::array<DB::SqlConnection::DataCommandAutoPtr, StmtTypeCount> m_commands;

    /**
     * Fills empty m_commands map with sql commands prepared for binding.
     *
     * Because the "sqlite3_prepare_v2" function takes many cpu cycles, the PrivilegeDb
     * is optimized to call it only once for one query type.
     * Designed to be used in the singleton contructor.
     */
    void initDataCommands();

    /**
     * Return wrapped prepared query for given query type.
     * The query will be reset after wrapper destruction.
     *
     * @param queryType query identifier
     * @return wrapped prepared query
     */
    StatementWrapper getStatement(StmtType queryType);

public:
    class Exception
    {
      public:
        DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
        DECLARE_EXCEPTION_TYPE(Base, IOError)
        DECLARE_EXCEPTION_TYPE(Base, InternalError)
        DECLARE_EXCEPTION_TYPE(Base, ConstraintError)
    };

    enum class Offline : bool { no, yes };
    enum class Db : bool { standard, test };
    /**
     * Constructor
     * @exception PrivilegeDb::Exception::IOError on problems with database access
     * @exception TizenPlatformConfig::Exception::ValueError on problems with reading tizen
     *            configuration
     *
     */
    explicit PrivilegeDb(Offline offline, Db db = Db::standard);

    /**
     * Begin transaction
     * @exception PrivilegeDb::Exception::InternalError on internal error
     *
     */
    void BeginTransaction(void);

    /**
     * Commit transaction
     * @exception PrivilegeDb::Exception::InternalError on internal error
     *
     */
    void CommitTransaction(void);

    /**
     * Rollback transaction
     * @exception PrivilegeDb::Exception::InternalError on internal error
     *
     */
    void RollbackTransaction(void);

    /**
     * Check if appName is registered in database
     *
     * @param appName - package identifier
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     *
     */
    bool AppNameExists(const std::string &appName);

    /**
     * Check if pkgName is already registered in database
     *
     * @param pkgName - package identifier
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     * @return true if pkgName exists in the database
     *
     */
    bool PkgNameExists(const std::string &pkgName);

    /**
     * Check if authorId is already registered in database
     *
     * @param authorId numerical author identifier
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     * @return true if authorId exists in the database
     *
     */
    bool AuthorIdExists(int authorId);

    /**
     * Return package id associated with a given application id
     *
     * @param appName - application identifier
     * @param[out] pkgName - return application's package identifier
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetAppPkgName(const std::string &appName, std::string &pkgName);

    /**
     * Return Tizen version associated with a given application identifier
     *
     * @param appName - application identifier
     * @param[out] tizenVer - return application's target Tizen version
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetAppVersion(const std::string &appName, std::string &tizenVer);

    /**
     * Add an application into the database
     *
     * @param appName - application identifier
     * @param pkgName - package identifier
     * @param uid - user identifier for whom application is going to be installed
     * @param targetTizenVer - target tizen version for application
     * @param author - author identifier
     * @param isHybrid - hybrid flag setting
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void AddApplication(
            const std::string &appName,
            const std::string &pkgName,
            uid_t uid,
            const std::string &targetTizenVer,
            const std::string &authorId,
            bool isHybrid);

    /**
     * Remove an application from the database
     *
     * @param appName - application identifier
     * @param uid - user identifier whose application is going to be uninstalled
     * @param[out] appNameIsNoMore - return info if appName is in the database
     * @param[out] pkgNameIsNoMore - return info if pkgName is in the database
     * @param[out] authorNameIsNoMore - return info if authorName is in the database
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void RemoveApplication(
            const std::string &appName,
            uid_t uid,
            bool &appNameIsNoMore,
            bool &pkgNameIsNoMore,
            bool &authorNameIsNoMore);

    /**
     * Get count of existing sharing of given path
     *
     * @param path - path name
     * @param[out] count - count of sharing
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetPathSharingCount(const std::string &path, int &count);

    /**
     * Get count of existing sharing between given applications
     *
     * @param ownerAppName - application identifier
     * @param targetAppName - application identifier
     * @param[out] count - count of sharing
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetOwnerTargetSharingCount(const std::string &ownerAppName, const std::string &targetAppName,
                                    int &count);

    /**
     * Get count of existing path sharing with target application
     *
     * @param targetAppName - application identifier
     * @param path - user identifier for whom privileges will be updated
     * @param[out] count - count of sharing
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetTargetPathSharingCount(const std::string &targetAppName,
                                   const std::string &path,
                                   int &count);

    /**
     * Add information about path sharing between owner application and target application
     *
     * @param ownerAppName - application identifier
     * @param targetAppName - application identifier
     * @param path - path name
     * @param pathLabel - label of path
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void ApplyPrivateSharing(const std::string &ownerAppName, const std::string &targetAppName,
                             const std::string &path, const std::string &pathLabel);

    /**
     * Remove information about path sharing between owner application and target application
     *
     * @param ownerAppName - application identifier
     * @param targetAppName - application identifier
     * @param path - path name
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void DropPrivateSharing(const std::string &ownerAppName, const std::string &targetAppName,
                            const std::string &path);

    /**
     * Get all shared paths mapped to application names
     *
     * @param appPathMap - map containing vectors of paths shared by applications mapped by name
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetAllPrivateSharing(std::map<std::string, std::vector<std::string>> &appPathMap);

    /**
     * Get all paths shared with target applications by specified owner application
     *
     * @param ownerAppName - owner of queried sharings
     * @param ownerSharing - map containing vectors of paths shared by specified application
     *                     mapped by target application names
     * @exception PrivilegeDb::Exception::InternalError on internal error
     */
    void GetPrivateSharingForOwner(const std::string &ownerAppName,
                                   std::map<std::string, std::vector<std::string>> &ownerSharing);
    /**
     * Get all paths shared with specified target application name
     *
     * @param targetAppName - target of queried sharings
     * @param targetSharing - map containing vectors of paths shared with specified application
     *                     mapped by owner application names
     * @exception PrivilegeDb::Exception::InternalError on internal error
     */
    void GetPrivateSharingForTarget(const std::string &targetAppName,
                                    std::map<std::string, std::vector<std::string>> &targetSharing);

    /**
     * Change sharing counter to 1.
     *
     * @param targetAppName - target application name
     * @param path - path name
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     */
    void SquashSharing(const std::string &targetAppName, const std::string &path);

    /**
     * Clear information about private sharing.
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void ClearPrivateSharing();

    /**
     * Retrieve list of apps assigned to user
     *
     * @param uid - user identifier
     * @param[out] apps - list of apps assigned to user,
     *                    this parameter do not need to be empty, but
     *                    it is being overwritten during function call.
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetUserApps(uid_t uid, std::vector<std::string> &apps);

    /**
     * Retrieve list of apps from a given package assigned to user
     *
     * @param uid - user identifier
     * @param pkgName - package identifier
     * @param[out] apps - list of apps assigned to user,
     *                    this parameter do not need to be empty, but
     *                    it is being overwritten during function call.
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetUserAppsFromPkg(uid_t uid, const std::string &pkgName, std::vector<std::string> &apps);

    /**
     * Retrieve list of apps assigned to user
     *
     * @param uid - user identifier
     * @param[out] pkgs - list of packages assigned to user,
     *                    this parameter do not need to be empty, but
     *                    it is being overwritten during function call.
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetUserPkgs(uid_t uid, std::vector<std::string> &pkgs);

    /**
     * Retrieve a list of all application ids for a package id
     *
     * @param pkgName - package identifier
     * @param[out] appNames - list of application identifiers for the package
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetPkgApps(const std::string &pkgName, std::vector<std::string> &appNames);

    /**
     * Retrieve list of all packages
     *
     * @param[out] packages - vector of package identifiers describing installed packages,
     *                        this parameter do not need to be empty, but
     *                        it is being overwritten during function call.
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetAllPackages(std::vector<std::string> &packages);

    /* Retrive an id of an author from database
     *
     * @param pkgName[in] package identifier
     * @param authorId[out] author id associated with the package, or -1 if no
     *                      author was assigned during installation
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetPkgAuthorId(const std::string &pkgName, int &authorId);

    /* Retrieve an id of an author from database by its name
     *
     * @param[in] authorName    author's name
     * @param[out] authorId     matching author id or -1 if no such author exists
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetAuthorIdByName(const std::string &authorName, int &authorId);

    /**
     * Retrieve vector of pairs with group_name (1st value) and privilege_name (2nd value)
     *
     * @param[out] privileges - list of privileges
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetGroupsRelatedPrivileges(std::vector<std::pair<std::string, std::string>> &privileges);

    /**
     * Set shared_ro field to 1 in package given by name
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void SetSharedROPackage(const std::string& pkgName);

    /**
     * Check whether package has shared_ro field set to 1 in db
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    bool IsPackageSharedRO(const std::string& pkgName);

    /**
     * Check whether package has is_hybrid field set to 1 in db
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    bool IsPackageHybrid(const std::string& pkgName);

    /**
     * Retrieve list of packages with information about shared RO presence and package type
     *
     * @param[out] packages - vector of PackageInfo objects describing installed packages,
     *                        this parameter do not need to be empty, but
     *                        it is being overwritten during function call.
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetPackagesInfo(std::vector<PkgInfo> &packages);

    /**
     * Add new privilege and license defined by application
     *
     * @param[in] appName - application identifier
     * @param[in] uid - user identifier
     * @param[in] privilege - privilege identifier
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void AddAppDefinedPrivilege(const std::string &appName, uid_t uid, const AppDefinedPrivilege &privilege);

    /**
     * Add vector of privileges defined by application
     *
     * @param[in] appName - application identifier
     * @param[in] uid - user identifier
     * @param[in] privileges - list of privileges
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void AddAppDefinedPrivileges(const std::string &appName, uid_t uid, const AppDefinedPrivilegesVector &privileges);

    /**
     * Add privilege and license used by client application
     *
     * @param[in] appName - application identifier
     * @param[in] uid - user identifier
     * @param[in] privilege - privilege identifier
     * @param[in] license - license
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void AddClientPrivilege(const std::string &appName, uid_t uid, const std::string &privilege,
                            const std::string &license);

    /**
     * Remove privileges/licenses defined by application
     *
     * @param[in] appName - application identifier
     * @param[in] uid - user identifier
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void RemoveAppDefinedPrivileges(const std::string &appName, uid_t uid);

    /**
     * Remove privileges/licenses used by client application
     *
     * @param[in] appName - application identifier
     * @param[in] uid - user identifier
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void RemoveClientPrivileges(const std::string &appName, uid_t uid);

    /**
     * Retrieve vector of pairs with privilege (1st value) and privilege type (2nd value)
     *
     * @param[in]  appName - application identifier
     * @param[in]  uid - user identifier
     * @param[out] privileges - list of privileges
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    void GetAppDefinedPrivileges(const std::string &appName, uid_t uid, AppDefinedPrivilegesVector &privileges);

    /**
     * Retrieve application and license of application which define privilege
     *
     * @param[in]  uid - user identifier
     * @param[in]  privilege - privilege identifier
     * @param[out] appName - application identifier
     * @param[out] pkgName - application package
     * @param[out] license - verification factor required by license-manager
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     * @return true if data were found in the database
     */
    bool GetAppPkgLicenseForAppDefinedPrivilege(uid_t uid,
                                                const std::string &privilege,
                                                std::string &appName,
                                                std::string &pkgName,
                                                std::string &license);

    /**
     * Retrieve license of client application
     *
     * @param[in]  appName - application identifier
     * @param[in]  uid - user identifier
     * @param[in]  privilege - privilege identifier
     * @param[out] license - verification factor required by license-manager
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     * @return true if data were found in the database
     */
    bool GetLicenseForClientPrivilegeAndApp(const std::string &appName,
                                            uid_t uid,
                                            const std::string &privilege,
                                            std::string &license);
    /**
     * Retrieve license of client application
     *
     * @param[in]  pkgName - application package
     * @param[in]  uid - user identifier
     * @param[in]  privilege - privilege identifier
     * @param[out] license - verification factor required by license-manager
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     * @return true if data were found in the database
     */
    bool GetLicenseForClientPrivilegeAndPkg(const std::string &pkgName,
                                            uid_t uid,
                                            const std::string &privilege,
                                            std::string &license);


    /**
     * Check whether user has installed package
     *
     * @exception PrivilegeDb::Exception::InternalError on internal error
     * @exception PrivilegeDb::Exception::ConstraintError on constraint violation
     */
    bool IsUserPkgInstalled(const std::string& pkgName, uid_t uid);
};

} //namespace SecurityManager