rpms/rsh/FC-4 netkit-rsh-0.17-pam-conv.patch, NONE, 1.1 netkit-rsh-0.17-pam-rhost.patch, NONE, 1.1 netkit-rsh-0.17-rcp-largefile.patch, NONE, 1.1 rsh.spec, 1.19, 1.20
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Nov 28 14:44:21 UTC 2005
Author: kzak
Update of /cvs/dist/rpms/rsh/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv23975
Modified Files:
rsh.spec
Added Files:
netkit-rsh-0.17-pam-conv.patch netkit-rsh-0.17-pam-rhost.patch
netkit-rsh-0.17-rcp-largefile.patch
Log Message:
sync with FC devel
netkit-rsh-0.17-pam-conv.patch:
rexecd.c | 86 ++++++++++++++++++++++++++++++++-------------------------------
1 files changed, 45 insertions(+), 41 deletions(-)
--- NEW FILE netkit-rsh-0.17-pam-conv.patch ---
--- netkit-rsh-0.17/rexecd/rexecd.c.pam-conv 2005-10-13 18:42:54.000000000 +0200
+++ netkit-rsh-0.17/rexecd/rexecd.c 2005-10-13 18:45:30.000000000 +0200
@@ -178,47 +178,51 @@
static char *PAM_username;
static char *PAM_password;
-static int PAM_conv (int num_msg,
- const struct pam_message **msg,
- struct pam_response **resp,
- void *appdata_ptr) {
- int count = 0, replies = 0;
- struct pam_response *reply = NULL;
- int size = sizeof(struct pam_response);
-
- #define GET_MEM if (reply) realloc(reply, size); else reply = malloc(size); \
- if (!reply) return PAM_CONV_ERR; \
- size += sizeof(struct pam_response)
- #define COPY_STRING(s) (s) ? strdup(s) : NULL
-
- for (count = 0; count < num_msg; count++) {
- GET_MEM;
- switch (msg[count]->msg_style) {
- case PAM_PROMPT_ECHO_ON:
- reply[replies].resp_retcode = PAM_SUCCESS;
- reply[replies++].resp = COPY_STRING(PAM_username);
- /* PAM frees resp */
- break;
- case PAM_PROMPT_ECHO_OFF:
- reply[replies].resp_retcode = PAM_SUCCESS;
- reply[replies++].resp = COPY_STRING(PAM_password);
- /* PAM frees resp */
- break;
- case PAM_TEXT_INFO:
- reply[replies].resp_retcode = PAM_SUCCESS;
- reply[replies++].resp = NULL;
- /* ignore it... */
- break;
- case PAM_ERROR_MSG:
- reply[replies].resp_retcode = PAM_SUCCESS;
- reply[replies++].resp = NULL;
- /* Must be an error of some sort... */
- default:
- return PAM_CONV_ERR;
- }
- }
- if (reply) *resp = reply;
- return PAM_SUCCESS;
+static int
+PAM_conv(int num_msg, const struct pam_message **msg,
+ struct pam_response **response, void *appdata_ptr)
+{
+ struct pam_response *pr;
+ const struct pam_message *pm;
+ int n;
+
+ if ((*response = malloc(num_msg * sizeof(struct pam_response))) == NULL)
+ return(PAM_CONV_ERR);
+ memset(*response, 0, num_msg * sizeof(struct pam_response));
+
+ for (pr = *response, pm = *msg, n = num_msg; n--; pr++, pm++)
+ {
+ switch (pm->msg_style) {
+ case PAM_PROMPT_ECHO_ON:
+ /* XXX: why not pam_set_item(PAM_RUSER) ? */
+ pr->resp_retcode = PAM_SUCCESS;
+ pr->resp = PAM_username ? strdup(PAM_username) : NULL;
+ /* PAM frees resp */
+ break;
+ case PAM_PROMPT_ECHO_OFF:
+ pr->resp_retcode = PAM_SUCCESS;
+ pr->resp = PAM_password ? strdup(PAM_password) : NULL;
+ /* PAM frees resp */
+ break;
+ case PAM_TEXT_INFO:
+ case PAM_ERROR_MSG:
+ /* ignore it... */
+ pr->resp_retcode = PAM_SUCCESS;
+ pr->resp = NULL;
+ break;
+ default:
+ /* Zero and free allocated memory and return an error. */
+ for (pr = *response, n = num_msg; n--; pr++)
+ {
+ if (pr->resp)
+ free(pr->resp);
+ }
+ free(*response);
+ *response = NULL;
+ return(PAM_CONV_ERR);
+ }
+ }
+ return PAM_SUCCESS;
}
static struct pam_conv PAM_conversation = {
netkit-rsh-0.17-pam-rhost.patch:
rexecd.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE netkit-rsh-0.17-pam-rhost.patch ---
--- netkit-rsh-0.17/rexecd/rexecd.c.pam-rhost 2005-11-28 15:24:14.000000000 +0100
+++ netkit-rsh-0.17/rexecd/rexecd.c 2005-11-28 15:27:08.000000000 +0100
@@ -312,7 +312,9 @@
PAM_password = pass;
pam_error = pam_start("rexec", PAM_username, &PAM_conversation,&pamh);
PAM_BAIL;
- (void) pam_set_item (pamh, PAM_TTY, "rexec"); /* we don't have a tty yet! */
+ pam_set_item (pamh, PAM_RUSER, user);
+ pam_set_item (pamh, PAM_RHOST, remote);
+ pam_set_item (pamh, PAM_TTY, "rexec"); /* we don't have a tty yet! */
pam_error = pam_authenticate(pamh, 0);
PAM_BAIL;
pam_error = pam_acct_mgmt(pamh, 0);
netkit-rsh-0.17-rcp-largefile.patch:
rcp.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE netkit-rsh-0.17-rcp-largefile.patch ---
--- netkit-rsh-0.17/rcp/rcp.c.largefile 2005-11-24 10:38:12.000000000 +0100
+++ netkit-rsh-0.17/rcp/rcp.c 2005-11-24 10:40:28.000000000 +0100
@@ -482,7 +482,7 @@
}
}
(void)snprintf(buf, sizeof(buf),
- "C%04o %lld %s\n", stb.st_mode&07777, (long long)(stb.st_size), last);
+ "C%04o %llu %s\n", stb.st_mode&07777, (unsigned long long)(stb.st_size), last);
(void)write(rem, buf, (int)strlen(buf));
if (response() < 0) {
(void)close(f);
Index: rsh.spec
===================================================================
RCS file: /cvs/dist/rpms/rsh/FC-4/rsh.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- rsh.spec 5 Mar 2005 11:53:30 -0000 1.19
+++ rsh.spec 28 Nov 2005 14:44:18 -0000 1.20
@@ -1,7 +1,7 @@
Summary: Clients for remote access commands (rsh, rlogin, rcp).
Name: rsh
Version: 0.17
-Release: 29
+Release: 29.1
License: BSD
Group: Applications/Internet
Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-rsh-%{version}.tar.gz
@@ -37,6 +37,9 @@
Patch23: netkit-rsh-0.17-nohost.patch
Patch24: netkit-rsh-0.17-ignchld.patch
Patch25: netkit-rsh-0.17-checkdir.patch
+Patch26: netkit-rsh-0.17-pam-conv.patch
+Patch27: netkit-rsh-0.17-rcp-largefile.patch
+Patch28: netkit-rsh-0.17-pam-rhost.patch
BuildRoot: %{_tmppath}/%{name}-root
@@ -99,7 +102,9 @@
%patch23 -p1 -b .nohost
%patch24 -p1 -b .ignchld
%patch25 -p1 -b .checkdir
-
+%patch26 -p1 -b .pam-conv
+%patch27 -p1 -b .largefile
+%patch28 -p1 -b .pam-rhost
# No, I don't know what this is doing in the tarball.
rm -f rexec/rexec
@@ -168,6 +173,11 @@
%{_mandir}/man8/*.8*
%changelog
+* Mon Nov 28 2005 Karel Zak <kzak at redhat.com> 0.17-29.1
+- fix #174146 - pam_access.so does not work with rexecd
+- fix #174045 - rcp outputs negative file size when over 2GB
+- rewrite rexecd PAM_conversation()
+
* Sat Mar 5 2005 Karel Zak <kzak at redhat.com> 0.17-29
- rebuilt
More information about the fedora-cvs-commits
mailing list