blob: 958363c93f3d19a14873eeb069d72177c1b2c559 [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
Ben Chancc67c522014-09-03 07:19:18 -070010#include <base/macros.h>
mukesh agrawal3ff527c2014-04-08 17:07:56 -070011
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_