Skip to content

Commit

Permalink
Re-apply deepin patches
Browse files Browse the repository at this point in the history
  • Loading branch information
UTsweetyfish committed Dec 20, 2023
1 parent 68efa5b commit fa4c820
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
openssh (1:9.6p1-1deepin1) unstable; urgency=medium

* Refresh and re-apply deepin patches:
- deepin-ssh-connect-idle-timeout.patch
- deepin-ssh-keygen-privatekey-file-perm.patch
* Drop deepin-package-version-ext.patch since we have dpkg vendor now.

-- Tianyu Chen <[email protected]> Wed, 20 Dec 2023 14:06:41 +0800

openssh (1:9.6p1-1) unstable; urgency=medium

* Use single quotes in suggested ssh-keygen commands (closes: #1057835).
Expand Down
20 changes: 20 additions & 0 deletions debian/patches/deepin-ssh-connect-idle-timeout.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Description: 完成 ssh、tty登录超时自动退出需求实现
增加sshd默认配置项,ssh连接之后900秒无操作,自动退出

Origin: https://gerrit.uniontech.com/plugins/gitiles/base/openssh/+/202f13d0e50e7d3fe478ad39be7c59ab3ed30b52
Task: https://pms.uniontech.com/zentao/task-view-60279.html
Last-Update: 2022-05-19

--- openssh-9.0p1.orig/sshd_config
+++ openssh-9.0p1/sshd_config
@@ -97,8 +97,8 @@ PrintMotd no
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
-#ClientAliveInterval 0
-#ClientAliveCountMax 3
+ClientAliveInterval 900
+ClientAliveCountMax 1
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
18 changes: 18 additions & 0 deletions debian/patches/deepin-ssh-keygen-privatekey-file-perm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph

Origin: https://gerrit.uniontech.com/plugins/gitiles/base/openssh/+/1aaa80cba01428f8738878a826db83fd1aeed6c4
Task: https://pms.uniontech.com/zentao/task-view-60275.html
Last-Update: 2022-05-20

--- openssh-9.0p1.orig/sshbuf-io.c
+++ openssh-9.0p1/sshbuf-io.c
@@ -102,7 +102,7 @@ sshbuf_write_file(const char *path, stru
{
int fd, oerrno;

- if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
+ if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0400)) == -1)
return SSH_ERR_SYSTEM_ERROR;
if (atomicio(vwrite, fd, sshbuf_mutable_ptr(buf),
sshbuf_len(buf)) != sshbuf_len(buf) || close(fd) != 0) {
2 changes: 2 additions & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ revert-ipqos-defaults.patch
maxhostnamelen.patch
conch-ssh-rsa.patch
systemd-socket-activation.patch
deepin-ssh-connect-idle-timeout.patch
deepin-ssh-keygen-privatekey-file-perm.patch

0 comments on commit fa4c820

Please sign in to comment.