{"thread":{"id":"13652","subject":"git-daemon whitelist issue","startedAt":"2008-05-24T14:04:58Z","lastAt":"2008-05-26T09:06:11Z","messageCount":2,"participants":["Jose Luis Rivas Contreras","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77657","messageId":"4838208A.6020205@gmail.com","threadId":"13652","inReplyTo":null,"subject":"git-daemon whitelist issue","fromName":"Jose Luis Rivas Contreras","fromEmail":"ghostbar38@gmail.com","sentAt":"2008-05-24T14:04:58Z","receivedAt":"2008-05-24T14:04:58Z","isPatch":false,"sender":{"key":"ghostbar38@gmail.com","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n[Please CC me, I'm not subscribed]\n\nHi, I know this will be a dummy question but I cannot find how to solve\nthis trying in several ways but none of them work. The issue is that\nwhen I try to clone I get:\n\nMay 24 09:25:39 jooga git-daemon: [14724]\n'/home/repo/git/xscreensaver.git': not in whitelist\n\nMy git-daemon conf is this:\n8< -----\nservice git\n{\n        disable         = no\n        type            = UNLISTED\n        socket_type     = stream\n        protocol        = tcp\n        user            = nobody\n        wait            = no\n        server          = /usr/bin/git-daemon\n        server_args     = --inetd --export-all\n}\n8< -----\n\nI've tried with `--inetd --export-all /home/repo/git', `--inetd\n- --export-all --base-path=/home/repo/git /home/repo/git', with\ninterpolated to with a symlink but nothing works, I'm trying with:\n\ngit clone git://repo.ghostbar.ath.cx/home/repo/git/xscreensaver.git noseless\n\nAnyway, cloning trough http worked but is not what I want :)\n\nAny toughs?\n\nRegards.\n- --\nJose Luis Rivas. San Cristóbal, Venezuela. PGP: 0xCACAB118\nhttp://ghostbar.ath.cx/{about,acerca} - http://debian.org.ve\n`ghostbar' @ irc.debian.org/#debian-ve,#debian-devel-es\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.6 (GNU/Linux)\n\niD8DBQFIOCCKOKCtW8rKsRgRArKWAKDFE4f1vbXZeuchYeQA7SnVqOzRdACdGWLs\nMHWJpXTr5189qCEm07IX59w=\n=5g4F\n-----END PGP SIGNATURE-----\n"},{"id":"77752","messageId":"483A7D83.2000501@op5.se","threadId":"13652","inReplyTo":"4838208A.6020205@gmail.com","subject":"Re: git-daemon whitelist issue","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-05-26T09:06:11Z","receivedAt":"2008-05-26T09:06:11Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Jose Luis Rivas Contreras wrote:\n> -----BEGIN PGP SIGNED MESSAGE-----\n> Hash: SHA1\n> \n> [Please CC me, I'm not subscribed]\n> \n> Hi, I know this will be a dummy question but I cannot find how to solve\n> this trying in several ways but none of them work. The issue is that\n> when I try to clone I get:\n> \n> May 24 09:25:39 jooga git-daemon: [14724]\n> '/home/repo/git/xscreensaver.git': not in whitelist\n> \n> My git-daemon conf is this:\n> 8< -----\n> service git\n> {\n>         disable         = no\n>         type            = UNLISTED\n>         socket_type     = stream\n>         protocol        = tcp\n>         user            = nobody\n>         wait            = no\n>         server          = /usr/bin/git-daemon\n>         server_args     = --inetd --export-all\n> }\n> 8< -----\n> \n> I've tried with `--inetd --export-all /home/repo/git', `--inetd\n> - --export-all --base-path=/home/repo/git /home/repo/git', with\n> interpolated to with a symlink but nothing works, I'm trying with:\n> \n\nSpecifying a symlinked path won't work. git-daemon (being of the\none-shot-fork school of programs) simply does a chdir() to the\nrequested directory and then getcwd(), which will never consider\nsymlinks. This is a security feature, since directory recursion\nattacks will never ever work.\n\n> git clone git://repo.ghostbar.ath.cx/home/repo/git/xscreensaver.git noseless\n> \n\nWhen you specify base-path, you tell git-daemon to prepend the\nbase-path to the directory the user requests.\n\nStart git-daemon like this:\n\ngit-daemon --base-path=/home/repo/git --export-all\n\nthen do\n\ngit clone git://repo.ghostbar.ath.cx/xscreensaver.git\n\nand it should work, assuming /home/repo/git/xscreensaver.git\nhas no symlinks in it.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"}]}