summaryrefslogtreecommitdiffstats
path: root/sandbox/win/src/sid.h
blob: 4656859bec99b62ad05624870069155bf38b7977 (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
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SANDBOX_SRC_SID_H_
#define SANDBOX_SRC_SID_H_

#include <windows.h>

namespace sandbox {

// This class is used to hold and generate SIDS.
class Sid {
 public:
  // Constructors initializing the object with the SID passed.
  // This is a converting constructor. It is not explicit.
  Sid(const SID *sid);
  Sid(WELL_KNOWN_SID_TYPE type);

  // Returns sid_.
  const SID *GetPSID() const;

 private:
  BYTE sid_[SECURITY_MAX_SID_SIZE];
};

}  // namespace sandbox

#endif  // SANDBOX_SRC_SID_H_