summaryrefslogtreecommitdiffstats
path: root/doc/console.c.spec.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:54:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:54:37 +0000
commit97c26c1924b076ef23ebe4381558e8aa025712b2 (patch)
tree109724175f07436696f51b14b5abbd3f4d704d6d /doc/console.c.spec.txt
parentInitial commit. (diff)
downloadshadow-97c26c1924b076ef23ebe4381558e8aa025712b2.tar.xz
shadow-97c26c1924b076ef23ebe4381558e8aa025712b2.zip
Adding upstream version 1:4.13+dfsg1.upstream/1%4.13+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 0000000..b7c0d0d
--- /dev/null
+++ b/doc/console.c.spec.txt
@@ -0,0 +1,36 @@
+$Id$
+
+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