| Age | Commit message (Collapse) | Author |
|
|
|
The "share" project has been moved to SourceHut with new name
"pakakeh.go".
|
|
This changes require us to replace golang.org/x/crypto with our fork,
since the [ssh.Session.Run] with context is not available yet in
upstream.
Implements: https://todo.sr.ht/~shulhan/awwan/9
|
|
This fix fetching SSH config where Hostname is not set but host name
may match with Host with wildcard.
|
|
If the file to be copied contains sensitive data, putting them in
"/tmp" considered a security risk, even though it will be moved to
destination later.
The issue is when the "#put" command failed, the plain file is left
on "/tmp" directory.
This changes add additional advantage where we did not need to remove
the temporary directory on remote when execution completed, since the
temporary directory should be accessible by user only.
Implements: https://todo.sr.ht/~shulhan/awwan/8
|
|
Previously, we used to run awwan as CLI so each connection is open and
closed (forcefully).
Since we now use awwan WUI frequently, any command that execute Play
does not close the session immediately once finished.
This cause many connections open in remote server.
This changes close the SSH connections immediately once the Play command
finished.
|
|
Better to fix and follow the reported warnings rather than adding
configuration file to add an exception.
|
|
|
|
Instead of passing stdout and stderr as "io.Writer", pass the Request,
so we can log using the Request mlog.
While at it, return error from sshClient rmdirAll so the caller can log
the error.
|
|
When script with magic command "#get!" or "#put!" executed using "play"
command, one can changes the owner and/or permission mode by setting
the user/group and permission bits after the magic command, for example,
#get!user:group+0600 src dst
Will changes the owner of dst in local into "user:group" with permission
"0600", while
#put!user:group+0600 src dst
Will changes the owner of dst in remote into "user:group" with permission
"0600".
|
|
In remote environment, using magic command "#get:" or "#put:" with owner
and mode like "#get:$OWNER+$MODE" or "#put:$OWNER+MODE" will changes
the file owner to $USER or $GROUP and/or permission to $MODE.
The file owner will not works if user does not have permission.
|
|
Each time the new session is created in local or remote, it will
create new temporary directory.
Previously, the name of temporary directory is random 16 characters
and numbers.
To distinguish this directory with others, we add prefix "awwan." to
the name.
|
|
The sshClient struct wrap the raw SSH connection and SFTP connection,
and provide methods get, put, sudoGet, sudoPut, mkdir, and rmdirAll.
|