blob: ccc43c17da444eabac490af9e19054ae85f3fd4b [file] [log] [blame]
mukesh agrawal3ff527c2014-04-08 17:07:56 -07001// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_SCOPED_UMASK_H_
6#define SHILL_SCOPED_UMASK_H_
7
8#include <sys/types.h>
9
10#include <base/basictypes.h>
11
12namespace shill {
13
14class ScopedUmask {
15 public:
16 explicit ScopedUmask(mode_t new_umask);
17 ~ScopedUmask();
18
19 private:
20 mode_t saved_umask_;
21
22 DISALLOW_COPY_AND_ASSIGN(ScopedUmask);
23};
24
25} // namespace shill
26
27#endif // SHILL_SCOPED_UMASK_H_