Skip to content

Commit

Permalink
Deprecate kpropd -S option
Browse files Browse the repository at this point in the history
ticket: 7376
  • Loading branch information
nicowilliams authored and greghudson committed Oct 5, 2012
1 parent 4a50490 commit 54d4ec8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
10 changes: 5 additions & 5 deletions doc/rst_source/krb_admins/admin_commands/kpropd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ SYNOPSIS
[**-p** *kdb5_util_prog*]
[**-P** *port*]
[**-d**]
[**-S**]

DESCRIPTION
-----------
Expand Down Expand Up @@ -74,11 +73,12 @@ OPTIONS
``/kdb5_util``.

**-S**
Turn on standalone mode. Normally, kpropd is invoked out of
[DEPRECATED] Enable standalone mode. Normally kpropd is invoked by
inetd(8) so it expects a network connection to be passed to it
from inetd(8). If the **-S** option is specified, kpropd will put
itself into the background, and wait for connections on port 754
(or the port specified with the **-P** option if given).
from inetd(8). If the **-S** option is specified, or if standard
input is not a socket, kpropd will put itself into the background,
and wait for connections on port 754 (or the port specified with the
**-P** option if given).

**-d**
Turn on debug mode. In this mode, if the **-S** option is
Expand Down
13 changes: 12 additions & 1 deletion src/slave/kpropd.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,21 @@ main(argc, argv)
krb5_error_code retval;
kdb_log_context *log_ctx;
int devnull, sock;
struct stat st;

setlocale(LC_ALL, "");
PRS(argv);

if (fstat(0, &st) == -1) {
com_err(progname, errno, _("while checking if stdin is a socket"));
exit(1);
}
/*
* Detect whether we're running from inetd; if not then we're in
* standalone mode.
*/
standalone = !S_ISSOCK(st.st_mode);

log_ctx = kpropd_context->kdblog_context;

signal_wrapper(SIGPIPE, SIG_IGN);
Expand Down Expand Up @@ -1143,7 +1154,7 @@ void PRS(argv)
debug++;
break;
case 'S':
standalone++;
/* Standalone mode is now auto-detected; see main(). */
break;
case 'a':
if (*word)
Expand Down

0 comments on commit 54d4ec8

Please sign in to comment.