File: spwd.py

package info (click to toggle)
kdevelop-python 5.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,364 kB
  • ctags: 87,869
  • sloc: python: 183,311; cpp: 16,695; xml: 1,106; sh: 14; makefile: 13
file content (47 lines) | stat: -rw-r--r-- 1,666 bytes parent folder | download | duplicates (6)
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
# AUTO-GENERATED FILE -- DO NOT EDIT

""" This module provides access to the Unix shadow password database.
It is available on various Unix versions.

Shadow password database entries are reported as 9-tuples of type struct_spwd,
containing the following items from the password database (see `<shadow.h>'):
sp_namp, sp_pwdp, sp_lstchg, sp_min, sp_max, sp_warn, sp_inact, sp_expire, sp_flag.
The sp_namp and sp_pwdp are strings, the rest are integers.
An exception is raised if the entry asked for cannot be found.
You have to be root to be able to use this module. """

__package__ = None

def getspall():
  """ getspall() -> list_of_entries
  Return a list of all available shadow password database entries, in arbitrary order.
  See spwd.__doc__ for more on shadow password database entries. """
  return []

def getspnam(name):
  """ getspnam(name) -> (sp_namp, sp_pwdp, sp_lstchg, sp_min, sp_max,
                      sp_warn, sp_inact, sp_expire, sp_flag)
  Return the shadow password database entry for the given user name.
  See spwd.__doc__ for more on shadow password database entries. """
  return (None, None, None, None, None, None, None, None, None)

class struct_spwd(object):
  """ spwd.struct_spwd: Results from getsp*() routines.
  
  This object may be accessed either as a 9-tuple of
    (sp_nam,sp_pwd,sp_lstchg,sp_min,sp_max,sp_warn,sp_inact,sp_expire,sp_flag)
  or via the object attributes as named in the above tuple. """

  n_fields = 9
  n_sequence_fields = 9
  n_unnamed_fields = 0
  sp_expire = None
  sp_flag = None
  sp_inact = None
  sp_lstchg = None
  sp_max = None
  sp_min = None
  sp_nam = None
  sp_pwd = None
  sp_warn = None