Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Structure Assignments

807578May 5 2004 — edited May 28 2004
Here is my question for Sun's C gurus:

------------------------------------------------------------------
I want to copy the contents of a structure into
another instance of the same structure.

Example:

struct mystruct
{
char field1[20];
char field2 [30];
int field3;
};

Given two instances of this structure:

struct mystruct a;
struct mystruct b;

Careful way to copy contents of a into b would be:

strcpy(b.field1,a.field1);
strcpy(b.field2,a.field2);
b.field3 = a.field3;

But I have tried this method:

b = a;

Compiled under our Sun OS, this works fine.

Questions: Am I justified in treating structures
as "true" datatypes, like ints, etc? Can I be confident
that doing a value assignment like that above
will always work? How portable is this? Is it part
of ANSI C?

I want to know if I should really avoid structure
assignment like this in an application that must
be fairly robust, and portable.

----------------------------------------------------------

Comments

Answer

What platform are you on? What are the permissions for the keyfile and directory containing the keyfile? In particular, are the file/directory permission set to permit only the current user to read them? Our new library defaults to enforcing the recommended SSH security practice of having keyfiles be readable by only the current user.

Marked as Answer by Robert Schaefer · Jan 2 2020
Robert Schaefer

Hi John,

i'm running SQL Developer on MacOS 10.15.2. The file permission for the private key is limited to "rw-------" (600). But the directory (".ssh") containing the keys has a lower permission level with "rwxr-xr-x". I limited it to "rwx------" and now the SSH Connections in SQL Developer are working again! Great support, thank you!

I'm glad that you were able to solve your issue. The lack of proper feedback with our new SSH library is something I am looking into. In a future release I hope to provide detailed information when we run into a configuration issue.

YujiSoftware

I had the same problem in my environment.
(SQLDeveloper version 21.2.1.204, build 204.1703)

After investigating the cause, I found that it was a bug in Apache Mina SSHD 2.6.0.
https://issues.apache.org/jira/browse/SSHD-1105
(I've confirmed that this fix solves the problem)

This bug has been fixed in sshd-2.7.0.

I want you to update the version of sshd included in SQLDeveloper.

John McGinnis-Oracle

Thanks for the update. Can you test in your environment with our 21.4.3 release? We updated to sshd-2.7.0 in that release, so hopefully it works out of the box.

YujiSoftware

Thank you for your comment.
After upgrading, it worked fine!
(SQL Developer version 21.4.3.063, build 063.0100)

The Japanese page is still 21.2.1, so I'd be happy if you could update it.
https://www.oracle.com/jp/tools/downloads/sqldev-downloads.html

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 25 2004
Added on May 5 2004
3 comments
64 views