summaryrefslogtreecommitdiff
path: root/doc/console.c.spec.txt
diff options
context:
space:
mode:
authorChristian Perrier <bubulle@debian.org>2013-07-27 18:42:08 +0200
committerChristian Perrier <bubulle@debian.org>2013-07-27 18:42:08 +0200
commitdb1dc7288b64873f4f39e8404fd99c1bf55c7a8b (patch)
tree10026e84c8b73d4e5ad6704ab1cb78ea7c63c305 /doc/console.c.spec.txt
parent6d11fd0a58e3bc52763f121421b1c0ffe09d48be (diff)
downloadshadow-db1dc7288b64873f4f39e8404fd99c1bf55c7a8b.tar.gz
Imported Upstream version 4.1.5.1upstream/4.1.5.1
Diffstat (limited to 'doc/console.c.spec.txt')
-rw-r--r--doc/console.c.spec.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/console.c.spec.txt b/doc/console.c.spec.txt
new file mode 100644
index 00000000..f386abed
--- /dev/null
+++ b/doc/console.c.spec.txt
@@ -0,0 +1,36 @@
+$Id: console.c.spec.txt 1342 2007-11-10 23:46:11Z nekral-guest $
+
+Specification for console.c source file --
+
+input values --
+ tty -- character pointer to device name with leading "/dev/"
+ removed.
+
+return values --
+ 0 -- false
+ 1 -- true
+
+int console (char * tty)
+ if "CONSOLE" string value is not present in login.defs
+ return true
+
+ if the first character of "CONSOLE" string value is not "/"
+ treat the string as a ":" delimited list of device
+ names and search for the value of tty in that
+ tokenized list.
+
+ if a match is found
+ return true
+
+ return false
+
+ if the file named by "CONSOLE" cannot be opened
+ return true
+
+ scan the file looking for a match between the input line
+ and the value of tty
+
+ if a match is found
+ return true
+
+ return false