{"thread":{"id":"9683","subject":"[PATCH] Explain in --pid-file that using --inetd implies it automatically","startedAt":"2007-08-29T08:07:37Z","lastAt":"2007-08-29T10:33:11Z","messageCount":5,"participants":["Jari Aalto","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"51777","messageId":"ejhm3gs6.fsf@cante.net","threadId":"9683","inReplyTo":null,"subject":"[PATCH] Explain in --pid-file that using --inetd implies it automatically","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-08-29T08:07:37Z","receivedAt":"2007-08-29T08:07:37Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n Documentation/git-daemon.txt |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex f902161..687deb2 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -124,7 +124,8 @@ OPTIONS\n \tDetach from the shell. Implies --syslog.\n \n --pid-file=file::\n-\tSave the process id in 'file'.\n+\tSave the process id in 'file'. When `--inetd` is in use, this\n+        option is not needed.\n \n --user=user, --group=group::\n \tChange daemon's uid and gid before entering the service loop.\n-- \n1.5.3.rc5\n\nAvailable also from git repository http://cante.net/~jaalto/git/git\n\n    Branch: Documentation/git-daemon.txt+option--pid-file\n"},{"id":"51779","messageId":"7vabsasqk2.fsf@gitster.siamese.dyndns.org","threadId":"9683","inReplyTo":"ejhm3gs6.fsf@cante.net","subject":"Re: [PATCH] Explain in --pid-file that using --inetd implies it automatically","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-29T08:17:17Z","receivedAt":"2007-08-29T08:17:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jari Aalto <jari.aalto@cante.net> writes:\n\n> diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\n> index f902161..687deb2 100644\n> --- a/Documentation/git-daemon.txt\n> +++ b/Documentation/git-daemon.txt\n> @@ -124,7 +124,8 @@ OPTIONS\n>  \tDetach from the shell. Implies --syslog.\n>  \n>  --pid-file=file::\n> -\tSave the process id in 'file'.\n> +\tSave the process id in 'file'. When `--inetd` is in use, this\n> +        option is not needed.\n\nIs it \"is not needed\"?  I think you meant to say \"is ignored\",\nIOW, no pid file is written.\n\nWhich unfortunately makes the title of your patch wrong as\nwell X-<. \n\nI am not seriously suggesting to apply the following patch at\nthis point, but I think this is what we should have done from\nthe beginning.\n\ndiff --git a/daemon.c b/daemon.c\nindex 9cf22fe..a7b7990 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -1143,8 +1143,8 @@ int main(int argc, char **argv)\n \t\tusage(daemon_usage);\n \t}\n \n-\tif (inetd_mode && (group_name || user_name))\n-\t\tdie(\"--user and --group are incompatible with --inetd\");\n+\tif (inetd_mode && (group_name || user_name || pid_file))\n+\t\tdie(\"--user, --group and --pid-file are incompatible with --inetd\");\n \n \tif (inetd_mode && (listen_port || listen_addr))\n \t\tdie(\"--listen= and --port= are incompatible with --inetd\");\n"},{"id":"51802","messageId":"7v7iner64l.fsf@gitster.siamese.dyndns.org","threadId":"9683","inReplyTo":"zm0a1vw9.fsf@cante.net","subject":"Re: [PATCH] Explain in --pid-file that using --inetd implies it automatically","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-29T10:23:54Z","receivedAt":"2007-08-29T10:23:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jari Aalto <jari.aalto@cante.net> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>>> -\tSave the process id in 'file'.\n>>> +\tSave the process id in 'file'. When `--inetd` is in use, this\n>>> +        option is not needed.\n>>\n>> Is it \"is not needed\"?  I think you meant to say \"is ignored\",\n>> IOW, no pid file is written.\n>\n> Corrected\n>\n>     git repository http://cante.net/~jaalto/git/git\n>     Branch: git-daemon.txt+option--pid-file.collapse\n>\n>  Documentation/git-daemon.txt |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n\nPhuleeeze.  Try to apply what you sent out with \"git am\" and\nwatch the resulting commit log message in horrors!\n\nHint. \"Documentation/SubmittingPatches\".\n\nThanks.  I'll do this by hand so no need to resend.\n\n>\n> diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\n> index f902161..861d68f 100644\n> --- a/Documentation/git-daemon.txt\n> +++ b/Documentation/git-daemon.txt\n> @@ -124,7 +124,8 @@ OPTIONS\n>         Detach from the shell. Implies --syslog.\n>  \n>  --pid-file=file::\n> -       Save the process id in 'file'.\n> +       Save the process id in 'file'. When `--inetd` is in use, this\n> +        option is ignored.\n>  \n>  --user=user, --group=group::\n>         Change daemon's uid and gid before entering the service loop.\n"},{"id":"51801","messageId":"zm0a1vw9.fsf@cante.net","threadId":"9683","inReplyTo":"7vabsasqk2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Explain in --pid-file that using --inetd implies it automatically","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-08-29T10:24:06Z","receivedAt":"2007-08-29T10:24:06Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n>> -\tSave the process id in 'file'.\n>> +\tSave the process id in 'file'. When `--inetd` is in use, this\n>> +        option is not needed.\n>\n> Is it \"is not needed\"?  I think you meant to say \"is ignored\",\n> IOW, no pid file is written.\n\nCorrected\n\n    git repository http://cante.net/~jaalto/git/git\n    Branch: git-daemon.txt+option--pid-file.collapse\n\n Documentation/git-daemon.txt |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex f902161..861d68f 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -124,7 +124,8 @@ OPTIONS\n        Detach from the shell. Implies --syslog.\n \n --pid-file=file::\n-       Save the process id in 'file'.\n+       Save the process id in 'file'. When `--inetd` is in use, this\n+        option is ignored.\n \n --user=user, --group=group::\n        Change daemon's uid and gid before entering the service loop.\n"},{"id":"51803","messageId":"7v3ay2r5p4.fsf_-_@gitster.siamese.dyndns.org","threadId":"9683","inReplyTo":"zm0a1vw9.fsf@cante.net","subject":"[PATCH] git-daemon(1): assorted improvements.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-29T10:33:11Z","receivedAt":"2007-08-29T10:33:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jari Aalto noticed a handful places in git-daemon documentation\nthat need to be improved.\n\n * --inetd makes --pid-file to be ignored, in addition to --user\n   and --group\n\n * receive-pack service was not described at all.  We should, if\n   only to warn about the security implications of it.\n\n * There was no example of per repository configuration.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * I'm planning to commit this one.\n\n Documentation/git-daemon.txt |   36 ++++++++++++++++++++++++++++++++++--\n 1 files changed, 34 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt\nindex f902161..efdcdad 100644\n--- a/Documentation/git-daemon.txt\n+++ b/Documentation/git-daemon.txt\n@@ -124,7 +124,8 @@ OPTIONS\n \tDetach from the shell. Implies --syslog.\n \n --pid-file=file::\n-\tSave the process id in 'file'.\n+\tSave the process id in 'file'.  Ignored when the daemon\n+\tis run under `--inetd`.\n \n --user=user, --group=group::\n \tChange daemon's uid and gid before entering the service loop.\n@@ -157,6 +158,13 @@ the facility of inet daemon to achieve the same before spawning\n SERVICES\n --------\n \n+These services can be globally enabled/disabled using the\n+command line options of this command.  If a finer-grained\n+control is desired (e.g. to allow `git-archive` to be run\n+against only in a few selected repositories the daemon serves),\n+the per-repository configuration file can be used to enable or\n+disable them.\n+\n upload-pack::\n \tThis serves `git-fetch-pack` and `git-peek-remote`\n \tclients.  It is enabled by default, but a repository can\n@@ -164,7 +172,19 @@ upload-pack::\n \titem to `false`.\n \n upload-archive::\n-\tThis serves `git-archive --remote`.\n+\tThis serves `git-archive --remote`.  It is disabled by\n+\tdefault, but a repository can enable it by setting\n+\t`daemon.uploadarchive` configuration item to `true`.\n+\n+receive-pack::\n+\tThis serves `git-send-pack` clients, allowing anonymous\n+\tpush.  It is disabled by default, as there is _no_\n+\tauthentication in the protocol (in other words, anybody\n+\tcan push anything into the repository, including removal\n+\tof refs).  This is solely meant for a closed LAN setting\n+\twhere everybody is friendly.  This service can be\n+\tenabled by `daemon.receivepack` configuration item to\n+\t`true`.\n \n EXAMPLES\n --------\n@@ -229,6 +249,18 @@ Repositories can still be accessed by hostname though, assuming\n they correspond to these IP addresses.\n \n \n+To enable `git-archive --remote` and disable `git-fetch` against\n+a repository, have the following in the configuration file in the\n+repository (that is the file 'config' next to 'HEAD', 'refs' and\n+'objects').\n++\n+----------------------------------------------------------------\n+[daemon]\n+\tuploadpack = false\n+\tuploadarchive = true\n+----------------------------------------------------------------\n+\n+\n Author\n ------\n Written by Linus Torvalds <torvalds@osdl.org>, YOSHIFUJI Hideaki\n-- \n1.5.3.rc7\n"}]}