+
Skip to content

修复 htpasswd 使用加密 在 linux 低内核版本报错的 bug #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ RUN cp /usr/share/gitweb/static/gitweb.css /usr/share/gitweb/static/gitweb.css.o
RUN mkdir /usr/share/gitweb/ihm

VOLUME /var/lib/git
WORKDIR /var/lib/git
EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]
Expand Down
9 changes: 6 additions & 3 deletions src/cmd/addauth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ usage(){

load(){
if [ ! -f $FPASS ]; then
htpasswd -bc $FPASS $1 $2
else
htpasswd -b $FPASS $1 $2
touch $FPASS
fi
htpasswd -b $FPASS $1 $2
if [ "$?" != 0 ] ; then
htpasswd -D $FPASS $1
printf "$1:$(openssl passwd -apr1 $2)\n" >> $FPASS
fi
}

Expand Down
1 change: 1 addition & 0 deletions src/cmd/addrepos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ load(){
mkdir $REPOS
cd $REPOS
git init --bare
echo "$1" > description
chmod -R 777 $REPOS
fi
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载